0
votes

deploying an internal (corporate) API manager 2.0.0 we found a limitation - the email address validation apparently enforces email validation with 2-4 email :

/store/site/themes/wso2/templates/ui/validation/custom-validation.js:

$.validator.addMethod('validEmail', function(value, element) {
   var emailRegex = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   return emailRegex.test(value);
}, i18n.t('Invalid email address'));

However - email addresses today may have even long last domain name (e.g. [email protected], [email protected])

I see the validation logic is implemented in the followinf file:

  • repository/deployment/server/jaggeryapps/store/site/themes/wso2/templates/ui/validation/custom-validation.js

Question: is the file the only place where the email format is enforced? (Users are managed in AD, so the default user view / management UI doesn't concern us too much atm)

1

1 Answers

0
votes

Seems the only place where the email is validated is the script:

repository/deployment/server/jaggeryapps/store/site/themes/wso2/templates/ui/validation/custom-validation.js