mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-25 16:52:17 +00:00
feat: console feature api (#1480)
This commit is contained in:
@@ -10,24 +10,6 @@ import { Gender } from 'src/app/proto/generated/zitadel/user_pb';
|
||||
import { ManagementService } from 'src/app/services/mgmt.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
function noEmailValidator(c: AbstractControl): any {
|
||||
const EMAIL_REGEXP: RegExp = /^((?!@).)*$/gm;
|
||||
if (!c.parent || !c) {
|
||||
return;
|
||||
}
|
||||
const username = c.parent.get('userName');
|
||||
|
||||
if (!username) {
|
||||
return;
|
||||
}
|
||||
|
||||
return EMAIL_REGEXP.test(username.value) ? null : {
|
||||
noEmailValidator: {
|
||||
valid: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-user-create',
|
||||
templateUrl: './user-create.component.html',
|
||||
@@ -88,7 +70,6 @@ export class UserCreateComponent implements OnDestroy {
|
||||
[
|
||||
Validators.required,
|
||||
Validators.minLength(2),
|
||||
this.userLoginMustBeDomain ? noEmailValidator : Validators.email,
|
||||
],
|
||||
],
|
||||
firstName: ['', Validators.required],
|
||||
|
||||
Reference in New Issue
Block a user