Skip to content

rahul447/form-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Form Builder App

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

App Details!

We can create a form field by adding a similar object defination as mentioned below in formConfig.js file. In this object, we just need to call createFormFieldConfig method and pass the validation rules in validationRules Array.

New validation Rules can be added to inputValidationRules.js

Finally Output of the form would be visible in the Console!

name: {
    ...createFormFieldConfig(FIELD.INPUT, "Full Name", "name", {type: "text"}),
    validationRules: [
      requiredRule("name"),
      minLengthRule("name", 3),
      maxLengthRule("name", 25)
    ]
},

Releases

No releases published

Packages

 
 
 

Contributors