Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
kcaparas1630 committed Jun 21, 2024
1 parent 19900e0 commit 7fd80df
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ const FieldsAndSoilComponent: React.FC<InputModuleProps> = ({ farmDetails, updat

const validationSchema = Yup.object().shape({
FieldName: Yup.string().max(24).required('Required'),
Area: Yup.number().min(1, 'Area should be higher than 1').max(100, 'Area should be lower than 100').required('Required'),
Area: Yup.number()
.min(1, 'Area should be higher than 1')
.max(100, 'Area should be lower than 100')
.required('Required'),
Comments: Yup.string().max(200, 'Comments should be lower than 200'),
});
/**
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/Commons/Input/ErrorMessage.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.errorMessage{
color:red;
font-size: 12px;
.errorMessage {
color: red;
font-size: 12px;
}
5 changes: 4 additions & 1 deletion frontend/src/Commons/Input/Field/CustomField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const CustomField: FC<CustomFieldProps> = ({ name, id, type, label, width = '100
id={id}
type={type}
/>
<ErrorMessage name={id} render={(msg) => <div className="errorMessage">{msg}</div>} />
<ErrorMessage
name={id}
render={(msg) => <div className="errorMessage">{msg}</div>}
/>
</StyledField>
);

Expand Down
5 changes: 4 additions & 1 deletion frontend/src/Commons/Input/TextArea/CustomTextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ const CustomTextArea: FC<CustomTextAreaProps> = ({
name={name}
id={id}
/>
<ErrorMessage name={id} render={(msg) => <div className="errorMessage">{msg}</div>} />
<ErrorMessage
name={id}
render={(msg) => <div className="errorMessage">{msg}</div>}
/>
</StyledField>
);

Expand Down

0 comments on commit 7fd80df

Please sign in to comment.