Closed HeberLZ closed 6 years ago
Hi, thanks for your PR. Can you show an example where this case is relevant? It's not common to use arrays as input values. Maybe it's better to keep this in Custom rules
I'm really sorry about this, created this pr a long time ago and somehow never saw your response with all the notifications, the use-case would be a SelectValidator with multiple=true, where the value would be an array. The same thing would happen when building a custom validator for the chip input which is not included in material-ui
I think it's better to have different rule, like isEmptyArray
. Otherwise we can have very complex isEmpty
in future, like checking empty objects etc
Makes sense, removed empty array check
Thanks for your work
Hi there,
I just updated the null check to make sure it's a strict comparison in order to prevent other falsy values from being accounted as empty and added an empty array check in case the value to be validated is an array, which is the case in the project I'm currently working on :)
Cheers!