ends_with
Checks that the value ends with one of the given strings.
Error codes: WRONG_FORMAT, FORMAT_ERROR
rules
input
Invaliderrors
{
"file": "WRONG_FORMAT"
}The arguments are one or more non-empty strings. The comparison is exact and case-sensitive; there is no normalization. The string form of the value is checked and returned.
js
{ file: { ends_with: '.pdf' } }
{ file: { ends_with: ['.jpg', '.jpeg', '.png'] } }See also starts_with and contains.