@carefirst/library 4.0.2 → 4.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,7 +43,7 @@ export class CFPFormValidators {
43
43
  static asEmail(canBeEmpty) {
44
44
  return (control) => {
45
45
  let setErrors = null;
46
- const emailRegEx = new RegExp('^[\\w-.]+@[\\w]+\\.[\\w]+');
46
+ const emailRegEx = new RegExp('^[\\w-.]+@[\\w-]+\\.[\\w]+');
47
47
  if (canBeEmpty && (control.value === null || control.value === '')) {
48
48
  return null;
49
49
  }
@@ -142,4 +142,4 @@ export class CFPFormValidators {
142
142
  };
143
143
  }
144
144
  }
145
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS12YWxpZGF0b3JzLXV0aWxpdHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jYXJlZmlyc3QvbGlicmFyeS9zcmMvbGliL3V0aWxzL2Zvcm0tdmFsaWRhdG9ycy11dGlsaXR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVVBLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUNqRCxPQUFPLGlCQUFpQixNQUFNLG9CQUFvQixDQUFDO0FBQ25ELE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQztBQUMxQixPQUFPLGlCQUFpQixNQUFNLGdDQUFnQyxDQUFDO0FBQy9ELEtBQUssQ0FBQyxNQUFNLENBQUMsaUJBQWlCLENBQUMsQ0FBQztBQUloQyxNQUFNLE9BQU8saUJBQWlCO0lBUTVCLE1BQU0sQ0FBQyxTQUFTLENBQUMseUJBQWlDO1FBQ2hELE9BQU8sQ0FBQyxPQUF3QixFQUEyQixFQUFFO1lBRTNELE1BQU0sZ0JBQWdCLEdBQTJCLE9BQU8sRUFBRSxNQUFNLEVBQUUsR0FBRyxDQUFDLHlCQUF5QixDQUFDLElBQUksSUFB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IH07XG4gIH1cbn1cbiJdfQ==
@@ -558,7 +558,7 @@ class CFPFormValidators {
558
558
  static asEmail(canBeEmpty) {
559
559
  return (control) => {
560
560
  let setErrors = null;
561
- const emailRegEx = new RegExp('^[\\w-.]+@[\\w]+\\.[\\w]+');
561
+ const emailRegEx = new RegExp('^[\\w-.]+@[\\w-]+\\.[\\w]+');
562
562
  if (canBeEmpty && (control.value === null || control.value === '')) {
563
563
  return null;
564
564
  }