You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a bit confused about how to combine different validation techniques. As i understand it, I can use CHECK_MODE_COERCE_TYPES to check types objects, arrays, integers, strings etc. as well as parameter requirements maxLength, minLength (strings), maximium, minimum (integers) etc.
However, if I also want to check if a parameter is an email string, I need to use FormatValidation (CHECK_MODE_COERCE_TYPES apparently only checks if the email parameter is a string).
So - I suppose I need to combine FormatValidation and CHECK_MODE_COERCE_TYPES. I'm not sure how to do that properly.
Also, please read the readme. Those flags do not mean what you think they mean! Types are always checked, regardless of whether or not CHECK_MODE_COERCE_TYPES is enabled. And CHECK_MODE_FormatConstraint isn't a flag at all.
You do not need to manually enable the format keyword; if the keyword is present in the schema, then it will be checked.
@victor-lund in an attempt to cleanup this repo we are trying to filter the issues and see which ones might be closed. Is it safe to assume this is a rather old issue, which seems answered and can be closed? Feel free to close it yourself with some comments if helpful.
I'm a bit confused about how to combine different validation techniques. As i understand it, I can use CHECK_MODE_COERCE_TYPES to check types objects, arrays, integers, strings etc. as well as parameter requirements maxLength, minLength (strings), maximium, minimum (integers) etc.
However, if I also want to check if a parameter is an email string, I need to use FormatValidation (CHECK_MODE_COERCE_TYPES apparently only checks if the email parameter is a string).
So - I suppose I need to combine FormatValidation and CHECK_MODE_COERCE_TYPES. I'm not sure how to do that properly.
I'm looking for something like this, but I assume this is not the proper way to go about it..?
The text was updated successfully, but these errors were encountered: