I have looked at the documentation and examples, didn't find an option to stop as soon as the first constraint violation occurs.
This can be useful in various situations:
Actual result:
Key: 'NoName.Field1' Error:Field validation for 'Field1' failed on the 'required' tag
Key: 'NoName.Field2' Error:Field validation for 'Field2' failed on the 'min' tag
Key: 'NoName.Field4' Error:Field validation for 'Field4' failed on the 'time_consuming_validation' tag
Desired result:
Key: 'NoName.Field1' Error:Field validation for 'Field1' failed on the 'required' tag
Validator should stop execution as soon as the first error occurs.
Don't want to validate Field2, don't want to loop over Field3, don't want to run time_consuming_validation on Field4.
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
Enhancement
I have looked at the documentation and examples, didn't find an option to stop as soon as the first constraint violation occurs. This can be useful in various situations:
Example:
Actual result: Key: 'NoName.Field1' Error:Field validation for 'Field1' failed on the 'required' tag Key: 'NoName.Field2' Error:Field validation for 'Field2' failed on the 'min' tag Key: 'NoName.Field4' Error:Field validation for 'Field4' failed on the 'time_consuming_validation' tag
Desired result: Key: 'NoName.Field1' Error:Field validation for 'Field1' failed on the 'required' tag
Validator should stop execution as soon as the first error occurs. Don't want to validate Field2, don't want to loop over Field3, don't want to run
time_consuming_validation
on Field4.This behavior may be configurable: