-
Notifications
You must be signed in to change notification settings - Fork 4.6k
DataViews: Add min/max validation support to DataForm inputs #73465
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
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
d6ba3c4 to
051a626
Compare
|
@jorgefilipecosta this needs to be implemented in |
3d04e64 to
da3509e
Compare
This reverts commit 1490580.
Co-authored-by: André <[email protected]>
848a131 to
a2fd0c0
Compare
Hi @oandregal it was fixed 👍 |
| ( formField.field.type === 'text' || | ||
| formField.field.type === 'email' || | ||
| formField.field.type === 'url' || | ||
| formField.field.type === 'telephone' || | ||
| formField.field.type === 'password' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to refactor this soon so that it's the field type that runs the validation (related).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the PR to move the validation logic to the field type #73642
|
We also need to support |
Adds min/max validation support for DataForm input controls, part of #71500.
cc: @oandregal
Field Types Supported
Text-based fields (character count validation minLength/maxLength):
texttextareaemailpasswordtelephoneurlNumeric fields (value range validation min/max):
integernumberImplementation
Rulestype to includeminLength,maxLength,min, andmaxpropertiesminMaxtoggle to demonstrate validation behaviorTesting
Enable the
minMaxcontrol in the Validation Storybook story to test the validation behavior across different field types.