Skip to content

Commit

Permalink
Change validation for Unauthroized Site Id
Browse files Browse the repository at this point in the history
  • Loading branch information
dk-bcps committed Jan 3, 2025
1 parent 9efffea commit e762c58
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ export const AuthoizationOutcomeForm: FC<props> = ({ id, type, value, leadIdenti
return false;
}

if (!unauthorized.match(/^\d{1,10}$/) && !authorized) {
setUnauthorizedErrorMessage("Invalid format. Please only include numbers.");
if (!unauthorized.match(/^[\d-/]{1,20}$/) && !authorized) {
setUnauthorizedErrorMessage("Invalid format. Please only include numbers and ‘-' and '/’ characters.");
return false;
}

Expand Down Expand Up @@ -170,7 +170,7 @@ export const AuthoizationOutcomeForm: FC<props> = ({ id, type, value, leadIdenti
inputClass="comp-form-control form-control outcome-authroization-unauthroized-site-input"
value={unauthorized}
error={unauthorizedErrorMessage}
maxLength={10}
maxLength={20}
prefix={{
value: "UA",
prefixClassName: "outcome-authroization-unauthroized-site-prefix",
Expand Down

0 comments on commit e762c58

Please sign in to comment.