Skip to content

Commit 5d99441

Browse files
committed
validate the LoginForm comp
1 parent 8719604 commit 5d99441

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Components/Forms/LoginForm/LoginForm.jsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import FormInput from '../FormInput/FormInput'
1010
import { Container, Form, Button } from 'react-bootstrap'
1111
import { useFormik } from 'formik'
1212
import { object, string } from 'yup'
13+
import PropTypes from 'prop-types'
1314

1415
// import utils
1516
import { getStorage, setUserId, updateStorage } from '../../../utils/storage'
@@ -121,4 +122,10 @@ const LoginForm = ({ onRegister, onLogin }) => {
121122
)
122123
}
123124

125+
// validate the component
126+
LoginForm.propTypes = {
127+
onRegister: PropTypes.func.isRequired,
128+
onLogin: PropTypes.func.isRequired,
129+
}
130+
124131
export default LoginForm

0 commit comments

Comments
 (0)