firestore-schema-validator
firestore-schema-validator copied to clipboard
email method and message
Where the .email() comes from? How to change the error messages?
@JSsantana Email uses this regex: https://github.com/bypatryk/firestore-schema-validator/blob/master/lib/filters.js#L73
You can use custom error message by providing errorMessage argument to .email(errorMessage)
- https://github.com/bypatryk/firestore-schema-validator/blob/master/lib/filters.js#L71
%s
will be replaced with field label (name) specified through .field(label)