Skip to content

anushkadoyan/Giving-Form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e7e1f21 · Jan 1, 2018

History

20 Commits
Jan 1, 2018
Jan 1, 2018
Jan 1, 2018
Jan 1, 2018
Jan 1, 2018
Jan 1, 2018
Jan 1, 2018

Repository files navigation

Giving Form

Responsive Giving Form using React, Redux Form, Node, and card-react.

To Run

In the root folder, run these commands:

$ npm install

$ npm start

Code Samples

Input Validation

...

if (!values.CCexpiry|| !/^(0[1-9]|1[0-2])\/?([0-9]{4}|[0-9]{2})$/.test(values.CCexpiry)) {
  errors.CCexpiry = 'Required';
}
if (!values.CCcvc || !/^[0-9]{3,4}$/.test(values.CCcvc)) {
  errors.CCcvc = 'Required';
}
return errors;

Redux Store

import { createStore, combineReducers } from 'redux';
import { reducer as reduxFormReducer } from 'redux-form';

const reducer = combineReducers({
  form: reduxFormReducer, // mounted under "form"
});
const store = (window.devToolsExtension
  ? window.devToolsExtension()(createStore)
  : createStore)(reducer);

export default store;

Screenshots

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published