Simple input validator React component
npm install --save react-inputs-validator
import { ValidatedInput } from 'react-inputs-validator'
function App(){
return(
<>
<ValidatedInput
type="email" // email / password
errorMessage="Not a valid e-mail!" // Error message for input
... Other Props
/>
</>
)
}
Other Props
- message="Must be a valid e-mail!" // Info message for input
- minLength="0" // Min length of a password
- maxLength="10" // Max length of a password
MIT