Skip to content

MhmtMutlu/react-inputs-validator

Repository files navigation

react-inputs-validator

Simple input validator React component

NPM JavaScript Style Guide

Install

npm install --save react-inputs-validator

Usage

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

License

MIT

Contributors