Skip to content

Commit

Permalink
fix typo GeneralInfo.js
Browse files Browse the repository at this point in the history
relates #189
  • Loading branch information
mFlaifel committed Jun 9, 2020
1 parent 5e56be3 commit dd945ad
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Typography from '../../common/Typography';
import selectBoxQuestions from './questions';
import { GeneralInfoStyles } from './style';

const GereralInfos = ({ handleFormInput, formValues, errorMsg }) => {
const GeneralInfos = ({ handleFormInput, formValues, errorMsg }) => {
const classes = GeneralInfoStyles();
const {
GazaAreas,
Expand Down Expand Up @@ -60,7 +60,10 @@ const GereralInfos = ({ handleFormInput, formValues, errorMsg }) => {
label="Full Name"
name="fullName"
onChange={handleFormInput}
isError={errorMsg.includes('Full Name is required')}
isError={
(formValues.fullName.length > 0 && formValues.fullName.length < 5) ||
errorMsg.includes('Full Name is required')
}
message="ex:- Sam Smith"
/>

Expand Down Expand Up @@ -176,12 +179,12 @@ const GereralInfos = ({ handleFormInput, formValues, errorMsg }) => {
);
};

GereralInfos.defaultProps = {
GeneralInfos.defaultProps = {
handleFormInput: () => {},
formValues: '',
errorMsg: [],
};
GereralInfos.propTypes = {
GeneralInfos.propTypes = {
handleFormInput: PropTypes.func,
formValues: PropTypes.shape({
gender: PropTypes.string,
Expand All @@ -201,4 +204,4 @@ GereralInfos.propTypes = {
errorMsg: PropTypes.arrayOf(PropTypes.string),
};

export default GereralInfos;
export default GeneralInfos;

0 comments on commit dd945ad

Please sign in to comment.