mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-06 14:22:15 +00:00
* verification dialog, service * i18n, verification dialog * file saver * savefile * verify trigger * delete project, i18n * org create dialog * org-create-self * stylelint * fix signout redirect * rm unused dialog component, import * project i18n de * regexp roles * use regex to check permissions * border radius * change validation flow * update org member * iam member change * lint * rm unused css * Update console/src/assets/i18n/de.json Co-authored-by: Fabi <[email protected]> * Update console/src/assets/i18n/de.json Co-authored-by: Fabi <[email protected]> * change guard Co-authored-by: Fabi <[email protected]>
46 lines
971 B
TypeScript
46 lines
971 B
TypeScript
import { FormControl } from '@angular/forms';
|
|
|
|
export function symbolValidator(c: FormControl): any {
|
|
const REGEXP: RegExp = /[^a-z0-9]/gi;
|
|
|
|
return REGEXP.test(c.value) ? null : {
|
|
invalid: true,
|
|
symbolValidator: {
|
|
valid: false,
|
|
},
|
|
};
|
|
}
|
|
|
|
export function numberValidator(c: FormControl): any {
|
|
const REGEXP = /[0-9]/g;
|
|
|
|
return REGEXP.test(c.value) ? null : {
|
|
invalid: true,
|
|
numberValidator: {
|
|
valid: false,
|
|
},
|
|
};
|
|
}
|
|
|
|
export function upperCaseValidator(c: FormControl): any {
|
|
const REGEXP = /[A-Z]/g;
|
|
|
|
return REGEXP.test(c.value) ? null : {
|
|
invalid: true,
|
|
upperCaseValidator: {
|
|
valid: false,
|
|
},
|
|
};
|
|
}
|
|
|
|
export function lowerCaseValidator(c: FormControl): any {
|
|
const REGEXP = /[a-z]/g;
|
|
|
|
return REGEXP.test(c.value) ? null : {
|
|
invalid: true,
|
|
lowerCaseValidator: {
|
|
valid: false,
|
|
},
|
|
};
|
|
}
|