Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 81dfa0d

Browse files
hubert-derivHubert Koster
andauthored
Hubert / Adding function that hides multiple error messages. (#6612)
* adding function that hides multiple error messages. * removing the added function and updating email regex Co-authored-by: Hubert Koster <hubertkoster@Huberts-MacBook-Pro.local>
1 parent 1302363 commit 81dfa0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/javascript/app/common/form_validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const Validation = (() => {
167167
ValidatorsMap.get().req.message = field.type === 'checkbox' ? localize('Please select the checkbox.') : localize('This field is required.');
168168
return false;
169169
};
170-
const validEmail = value => /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}$/.test(value);
170+
const validEmail = value => /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(value);
171171
const validPassword = (value, options, field) => {
172172
if (/^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]*$/.test(value)) {
173173
Password.checkPassword(field.selector, true);

0 commit comments

Comments
 (0)