Pierre-Luc Posted March 9, 2015 Posted March 9, 2015 I typically do frontend+backend form input validation by hand to fit whatever I have set in the field settings, but I was wondering if you guys knew a better way? I'm thinking about something like this: // Validate explicitly, afaik this does not exist $page->field->validate($input); // Or maybe something like that try { $page->field = $input; } catch (WireException $e) { // do something } I don't personally recall ever having trouble with saving a page and I guess it's mostly due to efforts I put in, but I'd like to make sure to keep everything in good condition without too much housekeeping. Especially I'd really like to be able not to have to maintain validation code if at all possible. Cheers!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now