#27945 closed Cleanup/optimization (fixed)
Clarify RegexValidator docs (match vs. search)
Reported by: | Shubham Jain | Owned by: | Sean Fagan |
---|---|---|---|
Component: | Documentation | Version: | 1.10 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
The documentation says, RegexValidator matches the regex against the value, and hence ideally it must use regex.match but instead uses regex.search.
This looks like a bug.
Change History (8)
comment:1 Changed 6 years ago by
Component: | Uncategorized → Core (Other) |
---|---|
Easy pickings: | set |
Has patch: | set |
Type: | Uncategorized → Bug |
comment:2 Changed 6 years ago by
comment:3 Changed 6 years ago by
So the documentation says, "regex pattern to search for provided value". I suppose this means, you try to see if value fits in the regex. But instead it sees if regex fits anywhere in the value. So in documentation, it must be "regex pattern to search for, in the provided value".
comment:4 Changed 6 years ago by
Component: | Core (Other) → Documentation |
---|---|
Has patch: | unset |
Summary: | RegexValidator uses search instead of match → Clarify RegexValidator docs (match vs. search) |
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → Cleanup/optimization |
comment:5 Changed 6 years ago by
Owner: | changed from nobody to Sean Fagan |
---|---|
Status: | new → assigned |
Note: See
TracTickets for help on using
tickets.
Where's the documentation you quoted? I see, "The regular expression pattern to search for the provided value". Presumably the documentation you mentioned should be fixed since changing behavior would be backwards incompatible.