|
|
@ -3,13 +3,15 @@ import { getPasswordValidators } from '@abp/ng.theme.shared'; |
|
|
import { ePropType, FormProp } from '@abp/ng.theme.shared/extensions'; |
|
|
import { ePropType, FormProp } from '@abp/ng.theme.shared/extensions'; |
|
|
import { Validators } from '@angular/forms'; |
|
|
import { Validators } from '@angular/forms'; |
|
|
|
|
|
|
|
|
|
|
|
const onlyLetterAndNumberRegex = /^[a-zA-Z0-9]+$/; |
|
|
|
|
|
|
|
|
export const DEFAULT_USERS_CREATE_FORM_PROPS = FormProp.createMany<IdentityUserDto>([ |
|
|
export const DEFAULT_USERS_CREATE_FORM_PROPS = FormProp.createMany<IdentityUserDto>([ |
|
|
{ |
|
|
{ |
|
|
type: ePropType.String, |
|
|
type: ePropType.String, |
|
|
name: 'userName', |
|
|
name: 'userName', |
|
|
displayName: 'AbpIdentity::UserName', |
|
|
displayName: 'AbpIdentity::UserName', |
|
|
id: 'user-name', |
|
|
id: 'user-name', |
|
|
validators: () => [Validators.required, Validators.maxLength(256)], |
|
|
validators: () => [Validators.required, Validators.maxLength(256), Validators.pattern(onlyLetterAndNumberRegex)], |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
type: ePropType.Password, |
|
|
type: ePropType.Password, |
|
|
|