Git Product home page Git Product logo

react-material-ui-form-validator's People

Contributors

dependabot[bot] avatar mrazicz avatar newoldmax avatar valyouw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-material-ui-form-validator's Issues

Custom validation rules doesn't block submit

Hi,

I'm having a wired issue, I'm trying to implement my own validation field for a picture upload, I have 4 rules applied to my object. And for example when the format is not correct, the error message displays via your function call, but the form can still be validated... :/

Thank you for such a awesome library by the way, saved my life!

Regex pattern or min,max number not working

I was trying to add validation for zipcode in textvalidator.
Like Below
<TextValidator
ref='zipCode'
hintText="ex. 00000"
name='zipCode'
onBlur={this.handleBlur}
onChange={this.onChange}
value={this.state.zipCode}
validators={['required','matchRegexp:^\d{5}$']}
errorMessages={[ 'Field is required','Zip Code should have 5 digits']}/>
OR
<TextValidator
ref='zipCode'
hintText="ex. 00000"
name='zipCode'
onBlur={this.handleBlur}
onChange={this.onChange}
value={this.state.zipCode}
validators={['required','minNumber:5', 'maxNumber:5']}
errorMessages={['Field is required','Zip Code should have 5 digits','Zip Code should have 5 digits']}/>

Both the ways are not working. Please help me on this issue

Try to add new validation rule using react-material-ui-form-validator 2.0.0-beta.2

I was trying to add new validation rule. I am using react "material-ui": "^1.0.0-beta.21",

Here is the code by which I try to add new rule but got error

ValidatorForm.addValidationRule('isCanRequired', (value) => { if(this.state.canSameAccount){ if(value==null || value==="" || value===undefined) return false; } return true; });

I add this code in componentWillMount but its not working.
Here is the error screenshot when I click on submit button
https://i.stack.imgur.com/cBJSv.png

Pass 'event' in submit(event) -> this.props.onSubmit();

I have a form where I can receive feedback from the server so I would need to call event.preventDefault() after ValidationForm submit.
By now, it is not possible to "catch" the event after all form validations have passed.

Handle error spacing/sizing

Is there a way to load the errors into a container already set under each form field?

The problem I have is that the whole form moves (each field below the first moves down) to accommodate the errors and from a UI/UX point of view it's kind of messy.

Not strictly a plug-in issue, just wanted to ask - am going to look into the code myself and see how I get on. Pretty new to React.

How to add maxLength attribute in TextValidator Component

I am using beta version of react-material-ui-form-validator. I have this component

<TextValidator floatinglabeltext="First Name" fullWidth name="firstName" value={this.state.firstName} validators={['required']} errorMessages={['Please enter your firstname']} label="Enter First Name*" onChange={this.handleChange('firstName')} />

and I want to add maxLength attribute into it. How can I add into it ?

validation error

i have dynamic form

inside ValidatorForm i made a loop for component
and inside the component is a few field

Loop

PassengerDetails(count, type) {
    let {dispatch} = this.props;
    let cart = [];
    for (let i = 0; i < count; i++) {
      const passengerIndex = this.calculatePassengerIndex(type, i);
      cart.push(
        <PassengerDetailsCart key={passengerIndex} passengerIndex={passengerIndex} isPrimary={this.isPrimary(type, i)} PassengerChange={this.PassengerChange}/>
      );
    }
    return cart
  }

Form

<ValidatorForm onSubmit={this.payment}
                           ref={form => this.form = form}
                           onError={errors => console.log(errors)}
                           name="passenger-details">
            <h4>Passenger adults ({this.reserve.adults})</h4>
            {this.PassengerDetails(this.reserve.adults, 'adults')}
            <h4>Passenger childs ({this.reserve.childs})</h4>
            {this.PassengerDetails(this.reserve.childs, 'childs')}
            <h4>Passenger infant ({this.reserve.infant})</h4>
            {this.PassengerDetails(this.reserve.infant, 'infant')}

            <RaisedButton>cancel</RaisedButton>
              </ValidatorForm>

components

return (
      <div className="passenger-details">


        <TextValidator
          floatingLabelText="First Name"
          name="first_name"
          onChange={this.handleChange}
          value={this.state.first_name}
          underlineStyle={{borderColor: '#9575CD'}}
          underlineFocusStyle={{borderColor: '#311B92'}}
          validators={['required']}
          errorMessages={['this field is required']}
          ref={this.props.ref}
        />
        <TextValidator
          floatingLabelText="last Name"
          value={this.state.last_name}
          name="last_name"
          onChange={this.handleChange}
          underlineStyle={{borderColor: '#9575CD'}}
          underlineFocusStyle={{borderColor: '#311B92'}}
          validators={['required']}
          errorMessages={['this field is required']}
          ref={this.props.ref}
        />
        <TextValidator
          floatingLabelText="national ID code"
          value={this.state.doc_id}
          onChange={this.handleChange}
          name="doc_id"
          validators={['required', 'isIRNationalCode']}
          errorMessages={['this field is required', 'nid is not valid']}
          underlineFocusStyle={{borderColor: '#311B92'}}
          underlineStyle={{borderColor: '#9575CD'}}
          ref={this.props.ref}

        />
        <SelectValidator
          name="gender"
          value={this.state.gender}
          onChange={this.changeGender}
          floatingLabelText="gender"
          underlineStyle={{borderColor: '#9575CD'}}
          underlineFocusStyle={{borderColor: '#311B92'}}
          iconStyle={{fill: '#9575CD'}}
          ref={this.props.ref}
        >
          {this.gender.map(this.menuItemElement)}
        </SelectValidator>
        <SelectValidator
          name="nationality"
          value={this.state.nationality}
          floatingLabelText="select your country"
          underlineStyle={{borderColor: '#9575CD'}}
          onChange={this.changeNationality}
          underlineFocusStyle={{borderColor: '#311B92'}}
          iconStyle={{fill: '#9575CD'}}
          ref={this.props.ref}
        >
          {this.nationality.map(this.menuItemElement)}
        </SelectValidator>
        {primary}
      </div>
    )

its just show error for first row but will be validate all field just showing error have problem
screen shot 2017-06-25 at 2 59 42 pm

React-Native support

I have a react-native version of this library (with TextInput support)
If anyone interested with it I can publish it.

Debounce property?

Hi,

I was wondering if you had some built-in debounce feature or were planning on adding it in anytime soon?

Form submission: Cannot read property 'preventDefault' of undefined

I have the following code:

export default class RegisterForm extends Component {

  constructor(props) {
    super(props);

    this.state = {

    };
    this.handleSubmit = this.handleSubmit.bind(this);
  }
 ....

handleSubmit(e) {
    e.preventDefault();
    var payload = this.state;
....

render() {
    return (
      <ValidatorForm ref="form" onSubmit={this.handleSubmit}>
          <TextValidator
              floatingLabelText="Name"
              onChange={this.handleChange}
....

          <RaisedButton label="Register" type="submit" />
      </ValidatorForm>
      );
  }
}

When submitting I get the following error:

Uncaught TypeError: Cannot read property 'preventDefault' of undefined

This should work, shouldn't it? Is there anything under the hood I've missed?

Many thanks, love the plug-in by the way, will do a PR when I have time and add some more validation types if any good for you

TextValidator InputAdornment

Hello,

I'm using material-ui: 1.0.0-beta.31 with TypeScript and would like to use the InputAdornment feature. Am I able to use that with your TextValidator? I was struggling to get it to work.

This is what I was doing before (without validation):
<FormControl> <InputLabel htmlFor="password">Password</InputLabel> <Input id="password" type={this.showPassword ? "text" : "password"} value={this.password} onChange={(e: any) => this.handleInputChange(e.target)} endAdornment={ <InputAdornment position="end"> <IconButton onClick={this.togglePassword} onMouseDown={() => (e) => event.preventDefault()}> {this.showPassword ? <VisibilityOff /> : <Visibility />} </IconButton> </InputAdornment>} margin="dense" fullWidth /> </FormControl>

Then I switched to using TextValidator:

<TextValidator label="Enter Password" name="password" id="password" type="password" validators={['required', 'matchRegexp:[A-Z]+', 'matchRegexp:[a-z]+','isPasswordLength']} errorMessages={['required field', 'must contain at least 1 uppercase', 'must contain at least 1 lower case','must be at least 8 characters']} value={this.reg.password} onChange={(e: any) => this.handleInputChange(e.target)} />

I like the TextValidator I just want a way to use the InputAdornment feature on it :)

Hope that makes sense, thanks!

'isEmpty' - TextValidator

When using the isEmpty validator it highlights the field only when there is text. It should only do this when the field has been modified and is empty.

image

Question: Adding rule to compare two fields

Hi dude!

This validator is pretty useful!. I would like to know how can I create/add a rule which compares two fields. I was reading the source code and debugging but I think at this moment, is not possible.

Thanks in advance for your time!

Cheers.

How to use regex modifiers in matchRegexp?

I want to match something case insensitive, for exmaple:

validators={['matchRegexp:/(https?:\/\/.*\.(?:png|jpg))/i']}

But this doesn't work as the matchRegexp expected value is a string not a RegExp.

viewing validation errors are not seen if the validators are cloned

in here , i am having one form at first and after clicking Add Participant button ,i want to clone the form.And after that the cloning the validation should be trigered for the cloned form elements too.
I have add the validation like this in the render function.

render() {
let participentSilo =  participantSilos.map(function(groupItem, key){ return (
           <ParticipantSilo onParticipantSiloChange={self.onParticipantSiloChange}
                            elmIndex={key} key={key} departments={departments}/>
return (
                           <ValidatorForm onSubmit={this.onClickInvite.bind(this)} >
                                   <div className="row">
                                       <div className="col-md-6">
                                           <TextValidator
                                               floatingLabelText="Survey Name"
                                               hintText="Enter Survey Name"
                                               name="surveyName"
                                               type="text"
                                               onChange={this.onaddsurvey}
                                               value = { this.state.Surveyname }
                                               validators={['required']}
                                               errorMessages={['this field is required']} />
                                       </div>
                                       <br />
                                       <br />
                                       <div className="col-md-6">
                                           <AlertMessageBox alert={alert} />
                                       </div>
                                   </div>

                                   { participentSilo }


                                   <div className="row">
                                       <div className="col-md-5">
                                           <RaisedButton label="Add new Participant" onClick={this.onClickAdd.bind(this)} primary={true}  />
                                       </div>
                                       <div className="col-md-5">
                                           <RaisedButton type="submit"
                                                         label="Invite Survey"
                                                         primary={true}
                                                         onClick={this.inviteSurvey}/>
                                       </div>
                                   </div>
                               </ValidatorForm>

And when I add newparticipantSilos` which means adding new component under Validatiorform
it will not show the validation errors onClickInvite()

minNumber validater validates input is correct when 2 characters set, regardless of value specified

Not sure if anyone else is seeing this, but it appears that when I use the validator in the below example, it validate the password after 2 characters rather than 6.
<TextValidator
type="password"
onChange={this.handleChange}
name="password"
value={formData.password}
validators={['required','minNumber:6']}
errorMessages={['This field is required.','Password must be at least 6 characters long.']}
floatingLabelText='Choose a Password'
/>

Required validation not working

Hi

I have a trouble with the library. I am not able to make work the required validation , it only works when the form is submited.

In the eample the email validation is working but the required not.

Thanks

<TextValidator
                        floatingLabelText="prueba email"
                        onChange={this.handleChange}
                        name="email"
                        type={'text'}
                        validators={['required', 'isEmail']}
                        errorMessages={['this field is required', 'email is not valid']}
                        value={this.state['email']}
                   />

Reset the form

how can i reset the form on button click after displaying the error messages?

v1 validation support

Hi, I'm using...

react-form-validator-core: ^0.4.1
react-material-ui-form-validator: ^2.0.0-beta.3
material-ui: 1.0.0-beta.30

Does TextValidator support all these:
matchRegexp
isEmpty
trim
isNumber
isFloat
isPositive
minNumber
maxNumber
minStringLength
maxStringLength
isString

as well as custom validations? I used a few of these (minStringLength, matchRegexp, custom: isPasswordMatch) with an older version of material-ui. But now I'm having troubles getting them to work with the newest version.

IsEmail and Required are the only ones that seem to work for me at the moment.

Thank you in advance!

Can't resolve 'react-autosuggest' in '/node_modules/react-material-ui-form-validator/lib'

Hello. Previously, I have successfully used this library with material-ui 0.19.x. I upgraded to material-ui v1.x and installed this library using @next. But now when I import {TextValidator}, it shows this error

Can't resolve 'react-autosuggest' in '/home/muhammad/WebstormProjects/school-web-latest/node_modules/react-material-ui-form-validator/lib'

Even if I am not using TextValidator in code, just importing it shows the error. I don't know if I am missing any library or something but the error states that 'react-autosuggest' is missing from this library. Kindly help.

Thank you.

When you define the type of the field, the validation does not works properly.

Hi,

I have defined the type of the field as you can see in the next example :

<TextValidator
            name="myField"
            id="myField"
            value={myField}
            type="number"
            onChange={this._handleFields}
            validators={['required', 'isNumber', 'isPositive']}
            errorMessages={[config.validations.required, config.validations.isNumber, config.validations.isPositive]}
          /><br />

However I saw the validation is not trigger properly. I would like to know if you have the same behavior.

Cheers!

Can't resolve 'react-autosuggest'

Hi,

I just stumbled across this package and wanted to try it out but when I install it I get this error message:

./~/react-material-ui-form-validator/lib/AutoCompleteValidator.js
Module not found: Can't resolve 'react-autosuggest' in '/Users/{account}/Documents/lodestar-client/node_modules/react-material-ui-form-validator/lib'

I installed the core package and am using Material UI 1.x but I am not using React 16. Could that be the problem?

Thanks!

email validation issue

I copy paste the code sample of the email validation.
the result is that I'm getting this is the console:

warning.js:36 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the XXXXX component.

and I failed to update the email property in the state on the component.

'required' validation doesn't support onBlur event for TextValidator

'required' field validation only worked with submit button not with onblur event.
To make it Work, other way I found is to add custom validation rule to validateForm.
Without using above workaround Is there any way to use 'required' validation with onblur event in textField?

reset() is not a function

Hi
I'm using react-material-ui-form-validator for my project. onChange event I want to reset Validator form for this I'm using following code:
this.refs.paymentForm.reset()
but getting following error:
Uncaught TypeError: this.refs.paymentForm.reset is not a function

Please help.
Thanks

Validation message showing even if the textfields are not empty

class App extends React.Component {

    constructor (props) {
      super(props)
      this.state = {
        data: {}
      }
      this.validatorListener = this.validatorListener.bind(this)
      this.onChange = this.onChange.bind(this)
      this.handleBlur = this.handleBlur.bind(this)
      this.handleSubmit = this.handleSubmit.bind(this)
    }

    onChange (event) {
      const { data } = this.state
      data[event.target.name] = event.target.value
      this.setState({ data })
    }

    handleSubmit (e) {
      e.preventDefault()
      console.log(this.state.data)
    }
    handleBlur = (event) => {
        this.refs[event.target.name].validate(event.target.value);
    }
    validatorListener (result) {
      this.setState({ disabled: !result })
    }

    render () {
      return (
          <ValidatorForm
              ref='form'
              onSubmit={this.handleSubmit}
              instantValidate
          >
          <div style={styles.row}>
             <Person/>
             <TextValidator
               ref='firstName'
               name='firstName'
               hintText='Your First Name'
               floatingLabelText='First Name'
               validators={['required']}
               onBlur={this.handleBlur}
               errorMessages={['required field']}
               errorStyle={styles.errorStyle}
               onChange={this.onChange}
             />
             <TextValidator
               ref='lastName'
               name='lastName'
               hintText='Your Last Name'
               floatingLabelText='Last Name'
               validators={['required']}
               onBlur={this.handleBlur}
               errorMessages={['required field']}
               errorStyle={styles.errorStyle}
               onChange={this.onChange}
             />
           </div>
           <TextValidator
             name='message'
             hintText='Message'
             floatingLabelText='Any message'
             multiLine
             fullWidth
             rows={2}
           />
           <div style={Object.assign({}, styles.row, styles.spaceBetween)}>
             <LocationOn/>
             <TextValidator
               ref='location'
               name='location'
               hintText='Your City'
               floatingLabelText='From where you would be travelling'
               validators={['required']}
               errorMessages={['required field']}
               errorStyle={styles.errorStyle}
               onBlur={this.handleBlur}
               onChange={this.onChange}
             />
             <div style={styles.divAlignCenter}>
               <RaisedButton
                 type='submit'
                 label={'Submit'}
                 labelPosition='before'
                 icon={<ThumbUp />}
                 backgroundColor={blue500}
                 labelStyle={styles.labelColor}
               />
             </div>
           </div>
          </ValidatorForm>
      )
    }
}

Also onSubmit is not getting triggered if I hit submit button.
Below, All fields filled then also it shows validation error on all
image
Below, Only one field empty then also it shows validation error on all
image

Above screenshot is after I hit submit button ( instant validation doesnot work for me as well )

material-ui v1

./node_modules/react-material-ui-form-validator/lib/AutoCompleteValidator.js
Module not found: Can't resolve 'material-ui/AutoComplete'

got this error after installing react-material-ui-form-validator@next

onError callback

Is there a way to have onError callback?
I have a case where I broke the form in multiple steps, so I want to validate the form on each step before I submit it.

                <ValidatorForm
                    ref="form"
                    onSubmit={this.handleSubmit}
                    instantValidate={true}
                >
                    <br />
                    {this.renderStep()}
                    <br/>
                    <BtnsWrapper>
                        <RaisedButton label="previous" onTouchTap={this.prevStep} 
                            primary style={{ display: step === 0 ? 'none' : '' }}/>
                        <RaisedButton label="next" onTouchTap={this.nextStep} 
                            primary disabled={isError ? true : false} />
                   </BtnsWrapper>
                </ValidatorForm>

I want to be able to disable the next button if the validation fails. So it would be nice if I can change the state of parent component inside of the callback if validation fails

isPasswordMatch

When adding the 'isPasswordMatch' functionality, it works as expected but starts checking as soon as anything is entered into any form field, therefore displaying the error before the user has even got to the field.

Is there any way to delay the initial check until the form is submitted, then after that, onChange?

matchRegExp Documentation

I'm going to need to use matchRegExp validation in order to validate some phone numbers. The documentation has nothing on how to use matchRegExp. Do you think you could update the docs and explain this?

_ValidationRules2.default[name] Error when using custom validator

Hi,
Error occurs when you try to type something in TextValidator with custom validator
(it even happen in project homepage when you write any letter in 'confirm password' field in 'Custom rules')

I'm using
"react": "16.2.0",
"material-ui": "0.20.0",
"react-material-ui-form-validator": "1.0.4",

image

'required' broken?

The required validator isn't working for me, and looks broken in the code. AFAICT IncludeRequired is never set anywhere, and therefore the required validator is never invoked.

Plans to support material-ui 1.0?

I noticed that this appears not to be compatible with the 1.0 beta of material-ui - its looking for components not included in that version

ERROR in ../~/react-material-ui-form-validator/lib/AutoCompleteValidator.js
Module not found: Error: Can't resolve 'material-ui/AutoComplete' in '/Users/davidnorth/src/material/node_modules/react-material-ui-form-validator/lib'

Has any work been done on this? If not I'll probably work on it myself in a fork.

Can't resolve TimePicker, AutoComplete, DatePicker and SelectField

I'm trying to run the examples. I'm importing the lib like this:

import { ValidatorForm } from 'react-form-validator-core'
import { TextValidator } from 'react-material-ui-form-validator'

and using like this:

<ValidatorForm
              ref='form'
              onSubmit={this.handleSubmit}
              onError={errors => console.log(errors)}
              className={css.form}>
              <div className={css.inputContainer}>
                <TextValidator
                  floatingLabelText='Email'
                  onChange={this.handleChange}
                  name='email'
                  value={formData.email}
                  placeholder='Enter your email'
                  validators={['required', 'isEmail']}
                  errorMessages={['this field is required', 'email is not valid']}
                />
              </div>
              <div>
                <TextValidator
                  floatingLabelText='Email'
                  onChange={this.handleChange}
                  name='email'
                  value={formData.email}
                  placeholder='Enter your email'
                  validators={['required', 'isEmail']}
                  errorMessages={['this field is required', 'email is not valid']}
                />
              </div>
              <div className={css.actions}>
                <a href=''>Forgot password?</a>
                <Button color='primary' type='submit' raised>Login</Button>
              </div>
</ValidatorForm>

I'm getting error messages like:

Module not found: Error: Can't resolve 'material-ui/SelectField' in 'C:\Users\Pietro Coelho\Desktop\matchat\matchat-app\node_modules\react-material-ui-form-validator\lib'

material-ui version: ^1.0.0-beta.30

it submits the form data although the validation fails

here is my code

`import React, { Component } from "react";
import { Card } from "material-ui/Card";
import { TextField } from "material-ui";
import ContentSend from "material-ui/svg-icons/content/send";
import SocialPerson from "material-ui/svg-icons/social/person";
import { ValidatorForm, TextValidator} from 'react-material-ui-form-validator';
import RaisedButton from "material-ui/RaisedButton";
const style = {
    boxForm: {
        textAlign: "center"
    },
    card: {
        backgroundColor: "#fff",
        marginBottom: "0px",
        padding: "0px 0px 46px 0px",
        fontSize: "16px",
        color: "gray",
        lineHeight: "25px",
        marginTop: "10%"
    }
};
class RegisterBox extends Component{
    constructor(props) {
        super(props);
        this.state = {
            user: {
                    companyName:null,
                    email:null,
                    role:"GDPR Administrator"
                  },
            valid:false
        };
        this.handleChange = this.handleChange.bind(this);
        this.handleSubmit = this.handleSubmit.bind(this);
    }
    handleChange = (event) =>{
        const { user } = this.state;
        user[event.target.name] = event.target.value;
        this.setState({ user });
    };
    handleBlur=(event) =>{
        this.refs[event.target.name].validate(event.target.value);
    };
    handleSubmit = (event) =>{
        event.preventDefault();
        const { user } =  this.state;
        // const {valid}=this.state.valid;
        if(Object.keys(user).length > 0  ){
            this.props.handleSubmit(user);
        }
    };
    render(){
        let {user} = this.state;
        let {role}="GDPR Administrator";
        return (
            <div className="grid-flex">
                <div className="grid-row-flex grid-row-flex-lg">
                    <div className="grid-column-flex"/>
                    <div className="grid-column-flex" style={style.boxForm} >
                        <Card style={style.card}>
                            <div className="account-access-title">
                                <SocialPerson color="aaa" viewBox="0 -10 30 30" />
                                <span className=""> Authentication</span>
                            </div>
                            <br />
                            <br />
                            <br />
                            <ValidatorForm
                                onSubmit={this.handleSubmit} method="POST"
                            >
                                <TextValidator
                                    floatingLabelText="Company Name"
                                    ref="companyName"
                                    onChange={this.handleChange}
                                    onBlur={this.handleBlur}
                                    name="companyName"
                                    type="text"
                                    validators={['required']}
                                    errorMessages={['companyName field is required']}
                                    value={user.companyName}
                                />
                                <TextValidator
                                    floatingLabelText="Email Address"
                                    ref="email"
                                    onChange={this.handleChange}
                                    onBlur={this.handleBlur}
                                    name="email"
                                    type="email"
                                    validators={['required','isEmail']}
                                    errorMessages={['Email field is required','email is not valid']}
                                    value={user.email}
                                />
                                <TextField
                                    defaultValue={user.role}
                                    value={user.role}
                                    disabled={true}
                                    name="role"
                                />

                                <br />
                                <br />
                                <div id="participantSubmit" >
                                    <RaisedButton
                                        type="submit"
                                        onClick={this.handleSubmit}
                                        label="Submit"
                                        labelColor="#fff"
                                        style={{ marginLeft: "8px" }}
                                        backgroundColor="#22d3c5"
                                        icon={<ContentSend />} />
                                </div>
                            </ValidatorForm>
                            <br />
                            <br />
                            <br />
                        </Card>
                    </div>
                    <div className="grid-column-flex"/>
                </div>
            </div>
        );
    }
};
export default RegisterBox;`

In here,the isEmail validation triggers when I enters a non valid email but the data is send with wrong email when I press the submit button.

Module not found: Can't resolve 'react-autosuggest' in 'D:\study\rc-admin\node_modules\react-material-ui-form-validator\lib'

  • {
    "name": "rc-admin",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
    "autoprefixer": "7.1.6",
    "axios": "^0.17.0",
    "babel-core": "6.26.0",
    "babel-eslint": "7.2.3",
    "babel-jest": "20.0.3",
    "babel-loader": "7.1.2",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-preset-react-app": "^3.1.0",
    "babel-runtime": "6.26.0",
    "body-parser": "^1.18.2",
    "case-sensitive-paths-webpack-plugin": "2.1.1",
    "chalk": "1.1.3",
    "cookie-parser": "^1.4.3",
    "css-loader": "0.28.7",
    "dotenv": "4.0.0",
    "echarts": "^3.7.2",
    "eslint": "4.10.0",
    "eslint-config-react-app": "^2.0.1",
    "eslint-loader": "1.9.0",
    "eslint-plugin-flowtype": "2.39.1",
    "eslint-plugin-import": "2.8.0",
    "eslint-plugin-jsx-a11y": "5.1.1",
    "eslint-plugin-react": "7.4.0",
    "express": "^4.16.2",
    "extract-text-webpack-plugin": "3.0.2",
    "file-loader": "1.1.5",
    "fs-extra": "3.0.1",
    "html-webpack-plugin": "2.29.0",
    "jest": "20.0.4",
    "lodash": "^4.17.4",
    "material-ui": "next",
    "material-ui-icons": "^1.0.0-beta.17",
    "mongoose": "^4.12.6",
    "node-sass": "^4.5.3",
    "nodemon": "^1.12.1",
    "object-assign": "4.1.1",
    "postcss-flexbugs-fixes": "3.2.0",
    "postcss-loader": "2.0.8",
    "promise": "8.0.1",
    "raf": "3.4.0",
    "react": "^16.0.0",
    "react-dev-utils": "^4.2.1",
    "react-dom": "^16.0.0",
    "react-material-ui-form-validator": "^2.0.0-beta.2",
    "react-redux": "^5.0.6",
    "react-router-dom": "^4.2.2",
    "redux": "^3.7.2",
    "redux-thunk": "^2.2.0",
    "sass-loader": "^6.0.6",
    "style-loader": "0.19.0",
    "sw-precache-webpack-plugin": "0.11.4",
    "typeface-roboto": "^0.0.43",
    "url-loader": "0.6.2",
    "webpack": "3.8.1",
    "webpack-dev-server": "2.9.3",
    "webpack-manifest-plugin": "1.3.2",
    "whatwg-fetch": "2.0.3"
    },
    "scripts": {
    "start": "node scripts/start.js",
    "build": "node scripts/build.js",
    "server:node": "nodemon server/server.js"
    },
    "jest": {
    "collectCoverageFrom": [
    "src//*.{js,jsx,mjs}"
    ],
    "setupFiles": [
    "/config/polyfills.js"
    ],
    "testMatch": [
    "/src/
    /tests//*.{js,jsx,mjs}",
    "/src/
    /?(.)(spec|test).{js,jsx,mjs}"
    ],
    "testEnvironment": "node",
    "testURL": "http://localhost",
    "transform": {
    "^.+\.(js|jsx|mjs)$": "/node_modules/babel-jest",
    "^.+\.css$": "/config/jest/cssTransform.js",
    "^(?!.
    \.(js|jsx|mjs|css|json)$)": "/config/jest/fileTransform.js"
    },
    "transformIgnorePatterns": [
    "[/\\]node_modules[/\\].+\.(js|jsx|mjs)$"
    ],
    "moduleNameMapper": {
    "^react-native$": "react-native-web"
    },
    "moduleFileExtensions": [
    "web.js",
    "mjs",
    "js",
    "json",
    "web.jsx",
    "jsx",
    "node"
    ]
    },
    "babel": {
    "presets": [
    "react-app"
    ],
    "plugins": [
    "transform-decorators-legacy"
    ]
    },
    "eslintConfig": {
    "extends": "react-app"
    },
    "proxy": "http://localhost:5168"
    }

260hyvw f3n naz489b oku
j 0 d2x vyg xty9cma zpy
k g6 9jswn 2ir 0kaw0 8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.