add a case-insensitive variant of Form::PATTERN#187
Merged
dg merged 1 commit intonette:masterfrom Jul 27, 2018
Merged
Conversation
dd41d13 to
46d72e9
Compare
Member
Some old browsers (such as PhantomJS used for testing) do not support I fixed it in e3b5529 |
dg
reviewed
Jul 25, 2018
src/assets/netteForms.js
Outdated
| }, | ||
|
|
||
| pattern: function(elem, arg, val) { | ||
| pattern: function(elem, arg, val, value, modifiers) { |
Member
There was a problem hiding this comment.
I think that argument caseInsensitive is better than modifiers.
Contributor
Author
There was a problem hiding this comment.
Ok. The same for the PHP bit then?
pub fun xxx(..., bool $caseInsensitive = false) {
$modifiers = 'u' . ($caseInsensitive ? 'i' : '');
}
Contributor
Author
46d72e9 to
7d632f4
Compare
Contributor
Author
|
@dg Rebased and adjusted. Let me know if you need anything else. Thank you. |
Member
|
Great, thanks! |
dg
pushed a commit
that referenced
this pull request
Jul 27, 2018
Contributor
Author
|
@dg Dope! Thank you. If you could back-port it to v2.4 that would be even more awesome :-) |
dg
pushed a commit
that referenced
this pull request
Jul 27, 2018
Member
|
Done |
renekliment
added a commit
to renekliment/nette-docs
that referenced
this pull request
Aug 22, 2018
dg
pushed a commit
to nette/docs
that referenced
this pull request
Aug 22, 2018
…ploads (#719) * documents nette/forms#186, nette/forms#187 and nette/forms#175
dg
pushed a commit
to nette/docs
that referenced
this pull request
Aug 22, 2018
…ploads (#719) * documents nette/forms#186, nette/forms#187 and nette/forms#175
dg
pushed a commit
to nette/docs
that referenced
this pull request
Dec 27, 2021
…ploads (#719) * documents nette/forms#186, nette/forms#187 and nette/forms#175
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an option to validate form controls like via
Form::PATTERN, but with case-insensitive regexp.I have a question about the
uregexp modifier. It is used in the PHP code, but not in the JS code. However, when I add it to the JS code, the tests break. Do you have more info on this? I thought this would result in enabled case folding on both sides consistently, but ... I don't know, this is not my area of expertise.Appreciate any pointers / ideas for improvements.
Thank you.