Closed brewsoftware closed 8 years ago
Note: This additionally has test reporting and working unit tests for the old and new behaviour. Note: I've also updated the test harness reporter to include code coverage. Note: Currently the conditions can either be all "and" or all "or" it does not support both.
TODO: Implement mixing of "or" and "and" condition logic. This would include something like...
(isEmpty|isEmail)&(isEmpty|isMobilePhone) backward compatability would keep the ',' seperator so the above could also be written as (isEmpty|isEmail),(isEmpty|isMobilePhone) or isEmpty|(isEmail|isMobilePhone)
Please see issue #25 for a description of the original issue.
This is covered by PR #54. A new single syntax to handle this and injecting parameters into the new Validator update.
Added a new format for handling "or" conditions. Specifically this would be written as
<ValidatedInput id="profile-companyMail" name="companyMail" type="email" placeholder="Email" validate="isEmpty|isEmail" errorHelp="Incorrect Email" />
The above would validate a non-required email field.