Details
-
Bug
-
Resolution: Done
-
Minor
-
None
-
None
-
None
-
Low
Description
When creating a MatchesConstraint for a Field, verifier should fails when the Fails doesn't match the pattern. Right now it is working in the opposite way.
Same happens with NotMatchesConstraint.
i.e. Here is a part of the verifier rule Generated by NotMatchesConstraint when I defined a Constraint dictating: 'Person's name should not matches "^[A-Z].*$"'
$restriction :LiteralRestriction(
fieldPath == $field.path,
valueAsString not matches "^[A-Z].*$"
)
Because I want verifier to fail when the name doesn't matches "[A-Z].$", the generated verifier rule should be: valueAsString matches "[A-Z].$"