@symphony-talent/component-library 4.25.0 → 4.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1438,6 +1438,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
1438
1438
  }]
1439
1439
  }] });
1440
1440
 
1441
+ class InputChipsModel {
1442
+ }
1443
+ const emailPattern = '/^((?!\.)(?!.*\.\.)[a-zA-Z0-9\-._+]*[^.])(@[a-zA-Z0-9]+)(\.[a-zA-Z0-9]+(\.[a-zA-Z0-9])?[^\_.\W])$/';
1444
+
1441
1445
  class ChipComponent {
1442
1446
  constructor() {
1443
1447
  this.removeChip = new EventEmitter();
@@ -1517,7 +1521,7 @@ class InputChipsComponent {
1517
1521
  validateEmail(form) {
1518
1522
  let errorCount = form.get(this.controlErrorCount).value;
1519
1523
  let control = this.form.controls[this.controlName];
1520
- const REGEXP = new RegExp('^[a-zA-Z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$');
1524
+ const REGEXP = new RegExp(emailPattern);
1521
1525
  for (let i = 0; i < control.value.length; i++) {
1522
1526
  if (!REGEXP.test(control.value[i].value)) {
1523
1527
  errorCount = errorCount + 1;
@@ -1556,7 +1560,7 @@ class EmailValidator {
1556
1560
  static createValidator(form, controlErrorCount) {
1557
1561
  return (control) => {
1558
1562
  let errorCount = form.get(controlErrorCount).value;
1559
- const REGEXP = new RegExp('^[a-zA-Z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$');
1563
+ const REGEXP = new RegExp(emailPattern);
1560
1564
  for (let i = 0; i < control.value.length; i++) {
1561
1565
  if (!REGEXP.test(control.value[i].value)) {
1562
1566
  errorCount = errorCount + 1;