-
-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Description
Version: 2.4.x
Bug Description
Hi! I'm trying to perform a case-insensitive pattern validation using the Form::PATTERN form rule, but it seems the functionality isn't there.
- Both the PHP & JS code puts stuff before and after the regexp so using global modifiers is not possible. Moreover, JS doesn't support in-line regexp modifiers.
- It seems that
Form::REGEXPused to exist in the past (but was removed) that could do this. Also, innetteForms.js, the handler function is still there.
Steps To Reproduce
$control->addRule(Form::PATTERN, 'Invalid file extension.', "(.*)\.(txt|md)");Expected Behavior
To be able to use the i modifier. Or to be able to achieve the same behavior in a reasonable way.
Possible Solution
Not sure. I don't know the reason behind removing Form::REGEXP and it seems weird to me that people wouldn't want to use this. Do they write new validation rules instead?
Metadata
Metadata
Assignees
Labels
No labels