You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a "contains" rule which checks if a substring exists, and a "not" rule which checks if the form value equals a preset value; however, there is no "notContains" rule to check that a substring does not exist.
If you enter "mean", the validation will error, but if you enter, "mean fluffy dog", the validation will pass. There should be a way to reverse the expected value of a rule so that the "contains" rule could check that a string does not exist. I would suggest adding a "!" in front of the rule's type.
The text was updated successfully, but these errors were encountered:
fpayer
changed the title
[Validate] How to not a rule
[Form Validation] Add "not" option to rule
Jul 14, 2015
Copied from the example on the docs: http://semantic-ui.com/behaviors/form.html#/examples
There is a "contains" rule which checks if a substring exists, and a "not" rule which checks if the form value equals a preset value; however, there is no "notContains" rule to check that a substring does not exist.
See the below JSFiddle:
https://jsfiddle.net/rduvhn8u/80/
If you enter "mean", the validation will error, but if you enter, "mean fluffy dog", the validation will pass. There should be a way to reverse the expected value of a rule so that the "contains" rule could check that a string does not exist. I would suggest adding a "!" in front of the rule's type.
The text was updated successfully, but these errors were encountered: