score:3

Accepted answer

you can add prop validationfailed to styledinput component.

<styledinput validationfailed={true} placeholder={businessnameplaceholder} required {...input} />

and then in styled component.

export const styledinput = styled.input`
  border-color: ${props => props.validationfailed ? "red" : "transparent";
`;

Related Query

More Query from same tag