diff --git a/packages/forms/src/directives/validators.ts b/packages/forms/src/directives/validators.ts index d30bf483eb..210ac90432 100644 --- a/packages/forms/src/directives/validators.ts +++ b/packages/forms/src/directives/validators.ts @@ -379,11 +379,6 @@ export const PATTERN_VALIDATOR: any = { * as the regex to validate Control value against. Follows pattern attribute * semantics; i.e. regex must match entire Control value. * - * Note: if a string type attribute value is used, the regex will be applied with the - * unicode flag on supported browsers. If a unicode-regex is passed, it might break on - * unsupported browser. In this case, the user should be responsible to handle the - * browser compatibility. - * * @usageNotes * ### Example * diff --git a/packages/forms/src/validators.ts b/packages/forms/src/validators.ts index d88ba19db3..aa742aeea2 100644 --- a/packages/forms/src/validators.ts +++ b/packages/forms/src/validators.ts @@ -306,11 +306,7 @@ export class Validators { if (pattern.charAt(pattern.length - 1) !== '$') regexStr += '$'; - if (RegExp.prototype.hasOwnProperty('unicode')) { - regex = new RegExp(regexStr, 'u'); - } else { - regex = new RegExp(regexStr); - } + regex = new RegExp(regexStr); } else { regexStr = pattern.toString(); regex = pattern;