Skip to content

Commit 1d1d231

Browse files
committed
fix(#3560): improve validation in UncontrolledImageInput by checking fieldState.error, ensuring users see input errors even with empty messages
1 parent 70e17de commit 1d1d231

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

govtool/frontend/src/components/organisms/UncontrolledImageInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ export const UncontrolledImageInput = <T extends FieldValues>({
5757
borderRadius: "50px",
5858
height: "50px",
5959
border: "1px solid",
60-
borderColor: fieldState.error?.message ? "red" : "#6F99FF",
61-
backgroundColor: fieldState.error?.message ? "#FAEAEB" : "white",
60+
borderColor: fieldState.error ? "red" : "#6F99FF",
61+
backgroundColor: fieldState.error ? "#FAEAEB" : "white",
6262
boxSizing: "border-box",
6363
margin: 0,
6464
display: "block",

0 commit comments

Comments
 (0)