getgrav / getgrav/grav-plugin-form
validate.message should not be used a title attribute
- Dominant language
- PHP
- Stars
- 64
- Forks
- 80
- Avg merge
- 10h 13m
- Merged PRs (30d)
- 9
Description
`templates/forms/default/field.html.twig`
`{% if field.validate.message %}title="{{ field.validate.message|t|e }}"`
But [documentation](https://learn.getgrav.org/forms/forms/reference-form-actions#validation-message) states: _This will enable you to write a custom message that users will see in the event that validation fails._
Instead a title fields is always enabled, field content being valid or not.
What we would expect is that `validate.message` parameters affects a `setCustomValidity()` behavior.
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation#Constraint_API's_element.setCustomValidity()
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with templates/forms/default/field.html.twig and inspect how validation messages and field attributes are rendered. Trace the form validation behavior and compare it with the linked documentation and setCustomValidity() API. Done means validate.message controls the validation feedback without enabling a title attribute for every field.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100