Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RegexValidator allowing partial matches #94

Merged
merged 4 commits into from
Sep 27, 2024
Merged

Conversation

ModernMAK
Copy link
Contributor

@ModernMAK ModernMAK commented Sep 25, 2024

Fix RegexValidator allowing partial matches

Now RegexValidator must require a full match on the target string to return a successfull match

Description

E.G.
Regex = "A[a-z]"

Would match:

  • "Alpha"
  • "breAk"
  • "somereallybadinputAz"

Instead of the expected:

  • "Ab"
  • "Ar"
  • "Az"

This also allowed any regex with * to match all inputs, as it would find a match of no length, and accept that as a successful match.

Now RegexValidator must require a full match on the target string to return a successfull match
@CLAassistant
Copy link

CLAassistant commented Sep 25, 2024

CLA assistant check
All committers have signed the CLA.

@codymullins codymullins merged commit 2aed86d into main Sep 27, 2024
5 checks passed
@codymullins codymullins deleted the regex-validator-patch branch September 27, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants