Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add multiple validators to a schema type #721
The ticket for this pull request is the following: #718
Now multiple validators can be added to a schema type in the declaration stage.
All the previous tests are passing and I added a new to test to check adding multiple validators.
If multiple validators fail, does this create an array of error messages? Or does it merely overwrite the error message with the last validation that fails? For me, it always seems to do the later... For example, if it's both isRequired and isEmail and the field is left blank, only the isEmail error message will be returned. It would be nice to get access to the messages of all of the validations that failed on a particular field.