See the example here.
Using the $validators pipeline, I am trying to check that a field contains the same value as another field.
Each input in this example is a
One problem is that when a validator fails (returns false
), then the underlying model value is set to undefined
. So:
"aaa"
; this is NOT the same as passwordConfirm
, so the validator returns false
and the model gets the undefined
valueundefined
and undefined !== "aaa"
, so the passwordConfirm validator returns false
too.