Skip to content

Commit

Permalink
fix: Revert "feat: CE-1067 NRIS number data validation" (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
barrfalk committed Sep 25, 2024
1 parent 6879230 commit bf00440
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export const DecisionForm: FC<props> = ({
if (officerAssigned) {
applyData({ ...data, assignedTo: officerAssigned });
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [officerAssigned]);

//-- update the decision state by property
Expand Down Expand Up @@ -328,12 +327,8 @@ export const DecisionForm: FC<props> = ({
_isValid = false;
}

if (
data.actionTaken === CASE_ACTION_CODE.RESPREC &&
data.inspectionNumber &&
!data.inspectionNumber.match(/^\d{1,10}$/)
) {
setInspectionNumberErrorMessage("Invalid format. Please only include numbers.");
if (data.actionTaken === CASE_ACTION_CODE.RESPREC && !data.inspectionNumber) {
setInspectionNumberErrorMessage("Required");
_isValid = false;
}

Expand Down Expand Up @@ -469,7 +464,7 @@ export const DecisionForm: FC<props> = ({
inputClass="comp-form-control"
value={data?.inspectionNumber}
error={inspectionNumberErrorMessage}
maxLength={10}
maxLength={5}
onChange={(evt: any) => {
const {
target: { value },
Expand Down

0 comments on commit bf00440

Please sign in to comment.