-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Issue] Fix type when validating field using attribute rules #38774
Comments
Hi @engcom-November. Thank you for working on this issue.
|
Hello @dvrgoc, Thank you for the report and collaboration! We are able to get the actual result, that is But can you mention the issue you are facing due to change in datatype. |
that is correct, this is datatype issue. While I was working with other methods of implementing the validation rules, all other rules return Boolean, not String. Please read my article which covers the topic - Deep Dive into Validation Rules If you have any questions, let me know. |
Hello @dvrgoc, Thanks for the update. I agree with this, inconsistent return type compared to rest of the methods is not a good practice and might cause error further down the line. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-12079 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
❌ You don't have permission to export this issue. |
This issue is automatically created based on existing pull request: #38773: Fix type when validating field using attribute rules
Description (*)
If attribute based rules are used to specify validation of a field in HTML, incorrect type is used when validating.
For example, validation rule is
ipv4
and has assigned a value of true and is processed as String, but should be Boolean instead.<input name="field" ipv4="true" ... />
Related Pull Requests
N/A
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
custom-form.phtml
)rules
method:{ipv4: 'true'}
{ipv4: true}
Questions or comments
The PR has been elaborated in my article which describes the issue in more details: Deep Dive into Validation Rules
Contribution checklist (*)
The text was updated successfully, but these errors were encountered: