diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.ts b/400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.ts
index 1f90e32..5353d5b 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.ts
@@ -47,12 +47,12 @@ export class AddUser implements OnInit {
this.alerts = '';
this.adduserFrm = this.fb.group({
id: [''],
- UserName: ['', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]],
- Password: ['', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]],
- ConfirmPassword: ['', [Validators.required,this.ClearWhitespaceValidator]],
+ UserName: ['', [Validators.required, Validators.minLength(8)]],
+ Password: ['', [Validators.required, Validators.minLength(8)]],
+ ConfirmPassword: ['', [Validators.required]],
FirstName: ['', [Validators.required,this.noWhitespaceValidator]],
LastName: ['', [Validators.required,this.noWhitespaceValidator]],
- EmailId: ['', [Validators.required,this.ClearWhitespaceValidator]],
+ EmailId: ['', [Validators.required]],
AccountNumberId: ['', Validators.required],
UserTypeId: ['', Validators.required],
ProductEditionId: ['', Validators.required]
@@ -87,35 +87,7 @@ export class AddUser implements OnInit {
redirect() {
this.router.navigate(['/']);
}
- public ClearWhitespaceValidator(control: FormControl) {
- // new validation for intial whaite space
- //****Birendra *****/
- var isValid=false;
- if(control.value!=null)
- {
- var inputvalue=control.value;
- var controlLen=inputvalue.length;
- if(controlLen==undefined)//undefined for integer value
- {
- isValid=true;
- }
- else if(controlLen!=0)
- {
- const isWhitespace = controlLen!=inputvalue.trim().length;
- isValid = !isWhitespace;
- if(!isValid)
- {
- control.setValue(inputvalue.trim());
-
- }
-
- }
- }
- // can use also on page of input control
- //
- return isValid ? null: { 'whitespace': true };
-
- }
+
public noWhitespaceValidator(control: FormControl) {
// new validation for intial whaite space
//****Birendra *****/
@@ -263,12 +235,12 @@ export class AddUser implements OnInit {
_buildForm(lcid) {
this.adduserFrm = this.fb.group({
id: [''],
- UserName: ['', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]],
- Password: ['', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]],
- ConfirmPassword: ['', [Validators.required,this.ClearWhitespaceValidator]],
+ UserName: ['', [Validators.required, Validators.minLength(8)]],
+ Password: ['', [Validators.required, Validators.minLength(8)]],
+ ConfirmPassword: ['', [Validators.required]],
FirstName: ['', [Validators.required,this.noWhitespaceValidator]],
LastName: ['', [Validators.required,this.noWhitespaceValidator]],
- EmailId: ['', [Validators.required,this.ClearWhitespaceValidator]],
+ EmailId: ['', [Validators.required]],
AccountNumberId: ['', Validators.required],
UserTypeId: ['', Validators.required],
ProductEditionId: ['', Validators.required]
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.html b/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.html
index 2d229f2..961924e 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.html
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.html
@@ -37,7 +37,7 @@