User tests: Successful: Unsuccessful:
With J4 we have the ability to use html5pattern validation. Where relevant this is much better than using php validaton. php validation only takes place on submit so
[more info about html5patterns here #18995]
This POC adds the ability to use JText for the validationmessage
For purely test purposes I have updated one field - the username for the Super User account in the installer.
If this concept is accepted then it can be applied in many places throughout joomla
Note we have different validation routines currently (js and php) and they are not consistent nor do they always work as intended see report by @astridx #19301
Status | New | ⇒ | Pending |
Category | ⇒ | Installation Language & Strings Libraries |
That's the big issue - locating all the different validations
Also it can't be used everywhere. For example in the admin we allow the site owner to create their own rules for usernames and passwords so we can't have a pattern
For example in the admin we allow the site owner to create their own rules for usernames and passwords so we can't have a pattern
I think you should be able to build up a regex to inject in PHP using the getOptions/setOptions JS API
That's the big issue - locating all the different validations
Honestly for now as long as the JFormRule*
classes regex and the JS regex in this file match up - it's good enough for now. Those two are the main sources of regex in the system (I'm ignoring the stuff in JFilterInput
as that's generic and in most cases won't have a JS associated filter I don't think).
Labels |
Added:
?
?
|
Closed - I don;t have the time to do this
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-09-25 18:31:29 |
Closed_By | ⇒ | brianteeman |
I'm ok with the principle of this - but as we're now going to be doing this in 3 places can we please use this opportunity to sync things up in terms of the regex used as per #19301 Just make it clear in each PR what regex is being changed (if any)