So far only test implemented as reported in #114.
I had a look on it and it seems to be a quite complex...
Edited:errorMessage is now cleared (to null) before validation the Input only when it is an array.
Why? The setter method setErrorMessage accept any type, but there is casting to (string).
Method prepareRequiredValidationFailureMessage called in isValid sets errorMessage to an array, and in this case we have to clear it before each validation.
Probably it needs more refactor in future. Because current complexity of these validation there is terrible!
So far only test implemented as reported in #114. I had a look on it and it seems to be a quite complex...
Edited:
errorMessage
is now cleared (tonull
) before validation the Input only when it is anarray
. Why? The setter methodsetErrorMessage
accept any type, but there is casting to(string)
. MethodprepareRequiredValidationFailureMessage
called inisValid
sets errorMessage to an array, and in this case we have to clear it before each validation.Probably it needs more refactor in future. Because current complexity of these validation there is terrible!