I have pre, post and “regular” validators.
How can I completely disable postvalidator or check for failure from postvalidator if “regular” validator has already failed?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This isn’t possible using some Symfony setting. The
sfValidatorSchemachecks everything, so all errors are reported to the user. And normally, this is exactly what you want.So, I don’t know what your postvalidator looks like, but if it’s custom built, you can probably just check if the value in the
$valuesarray is empty. If so, just return the values without throwing an error.