fix(clients): block Alternate Mobile No from matching Mobile No
Same number in both fields defeats the point of having a second contact route, and re-running DIP on an identical number is pointless. Added a cross-field validator on alternateMobileNo, re-checked whenever mobileNo changes, with a matching error message and the Verify-with-DIP button disabled while the clash exists. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+10
-1
@@ -969,6 +969,11 @@
|
||||
createClientForm.get('alternateMobileNo')?.touched
|
||||
) {
|
||||
<mat-error>Enter valid 10-digit number (starts with 6-9)</mat-error>
|
||||
} @else if (
|
||||
createClientForm.get('alternateMobileNo')?.hasError('sameAsMobile') &&
|
||||
createClientForm.get('alternateMobileNo')?.touched
|
||||
) {
|
||||
<mat-error>Alternate number can't be the same as Mobile No</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
@@ -979,7 +984,11 @@
|
||||
color="primary"
|
||||
type="button"
|
||||
class="verify-btn"
|
||||
[disabled]="readOnly || createClientForm.get('alternateMobileNo')?.value?.length !== 10"
|
||||
[disabled]="
|
||||
readOnly ||
|
||||
createClientForm.get('alternateMobileNo')?.value?.length !== 10 ||
|
||||
createClientForm.get('alternateMobileNo')?.hasError('sameAsMobile')
|
||||
"
|
||||
(click)="verifyAlternateDIP()"
|
||||
>
|
||||
<fa-icon icon="shield-alt" class="m-r-10"></fa-icon>
|
||||
|
||||
Reference in New Issue
Block a user