Issue #801: Added regex pattern to Name & UniqueName fields and custo…#822
Draft
ahungerford-unicon wants to merge 1 commit intomainfrom
Draft
Issue #801: Added regex pattern to Name & UniqueName fields and custo…#822ahungerford-unicon wants to merge 1 commit intomainfrom
ahungerford-unicon wants to merge 1 commit intomainfrom
Conversation
…m error checking for those fields
Comment on lines
+96
to
+99
| // # Disabled pattern validation here; now handled on handleCreateOrEdit | ||
| // if (field.pattern && createParams[field.name] && !new RegExp(field.pattern).test(createParams[field.name])) { | ||
| // setCreateError(`The following fields have invalid values:\n > ${field.patternErr}`); | ||
| // } |
Contributor
Author
There was a problem hiding this comment.
Left this in but commented as I originally had this checking as the field was edited, but wasn't really satisfied with the result since it would replace any onSave reported errors as soon as you started to correct one of them. I believe we could get inline checking done without this if we updated the Dialog to an actual form, since that is how the pattern attribute usually works, but my quick tests with it caused other issues to crop up for Dialog that didn't make it worth it.
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.
…m error checking for those fields
Edit: Changed it to a Draft as this requires #810 to be completed first.