[MGNLFORM-234] ValidateExpression should not extend NoHTMLValidator, as it prohibits valid password characters Created: 11/Aug/14  Updated: 16/Oct/14  Resolved: 14/Oct/14

Status: Closed
Project: Magnolia Form Module
Component/s: validation
Affects Version/s: 2.2.5
Fix Version/s: 2.2.8

Type: Bug Priority: Neutral
Reporter: Christian Ringele Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Date of First Response:

 Description   

The regexp based validator:
info.magnolia.module.form.validators.ValidateExpression
extends the class:
info.magnolia.module.form.validators.NoHTMLValidator

Using the NoHTMLValidator as a base class for all other fields makes sense, as it prohibits html characters in form fields. But the NoHTMLValidator prohibits characters which are perfectly fine as password characters.

So the ValidateExpression should directly extends the base class Validator, and if by default it still should constrain by the html characters, it should directly be added to the used expression itself. So its obvious and easy changeable.



 Comments   
Comment by Federico Grilli [ 14/Oct/14 ]

For the release notes/documentation:
info.magnolia.module.form.validators.ValidateExpression has been deprecated in favour of info.magnolia.module.form.validators.RegexValidator. The latter no longer extends NoHTMLValidator

Generated at Mon Feb 12 05:38:12 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.