# React Car Registration A react component for validating car registrations.
label
String - Header that appears next to select boxoptions
Array - Contains options for the selecttext
String - Required, option nameplaceholder
String - Placeholder that will appear in the input fieldvalidation
RegExp - The regex that will be applied to the input field
labelContainerClass
String - Name that will be applied to the class containing the label (Useful for bootstrap classes)inputContainerClass
String - Name that will be applied to the class containing the label (Useful for bootstrap classes)errorMessage
String - Error that is shown when the input doesn't match the regexinputEntered
Function - Callback that provides the app with the data enteredinputName
String - Name applied to the input classplaceholderInMessage
Boolean - True to show the placeholder at the end of the error message
git clone git@github.com:holidayextras/react-car-reg.git
cd react-car-reg
npm install
npm start
Unit tests are written in mocha and uses sinon
and chai
. To run the suite use the following command:
npm test
To see the coverage report and debug any issues open coverage/lcov-report/index.html
in your browser.
To check the code run:
npm run lint