User tests: Successful: Unsuccessful:
Original by @itbra :
I found the form validator to process the passed value only making it hard to implement custom validation rules. I am using form field types that make use of additional data-attributes. These attributes may serve information required to implement a custom validation rule. For instance to validate a date field (filled by a datepicker) the validator not only needs the value, but also a rule (date format) to validate against. This rule may be geographically different and a data-attribute like data-format="YY/MM/DD"may allow to validate the selected date against this rule. When it was possible to pass the element being validated along with the value to be checked the handler may fetch the required date format from the data-format attribute and apply it.
I did not touch the existing handlers' signature since they must not explicitely changed. The passed in element may be accessible via the implicitly accessable arguments object. But, if it is wished to add them a second function parameter for the element i can change it.
This PR implements a very tiny change providing more validation flexibility.
(I am just helping with the PR)
Labels |
Added:
?
|
Status | Pending | ⇒ | Ready to Commit |
Rel_Number | ⇒ | 4672 | |
Relation Type | ⇒ | Related to |
Setting this to RTC as it has 2 successful tests on the original PR and one on this one.
The original PR is outdated and this is just to bring it in sync with staging.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5277.
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-12-22 23:22:52 |
Merged. Thanks guys!
Labels |
Removed:
?
|
@itbra can you give this a test to be sure all is OK? I think with the 2 original tests we shoul dbe good to go.