// email
// Prefix (i.e. left of '@' Symbol) - Max Length 64
// [A-Z][a-z][0-9] AND any special char BUT special char cannot be the start or end of prefix
// Domain (i.e. right of '@' Symbol) - Max Length 254
// [A-Z][a-z][0-9][-.]
email: ['', [Validators.required,Validators.pattern('^[a-zA-Z0-9]([a-zA-Z0-9|.|_|-]+)?[A-Za-z0-9]{1}@[a-zA-Z0-9]+(\.[a-zA-Z0-9|-]+)+$'),Validators.pattern('^[a-zA-Z0-9|.|_|-]{1,64}[@]{1}[a-zA-Z0-9|.|-]{1,254}$')]],
// 大写字母,中间可以有空格
tag: ['', Validators.pattern('^[A-Z0-9]+(\\s+[A-Z0-9]+)*$')],
email 正则
最新推荐文章于 2022-12-21 12:01:06 发布