galikvalkin / react-native-form-validation

Simple JS form validation
MIT License
17 stars 5 forks source link

Undefined error when submitting #5

Closed fithaN closed 6 years ago

fithaN commented 6 years ago

I tried using the example as below.

this.passwordInput.focus()} keyboardType="email-address" autoCapitalize="none" autoCorrect={false} style={styles.input} value={this.state.textInput1} onChange={this.textInput1Change.bind(this)} /> (this.passwordInput = input)} style={styles.input} />
But i am getting undefined error as attached when submitting the form. screen shot 2018-01-23 at 7 10 56 pm
galikvalkin commented 6 years ago

Hello @fithaN Thank you for report.

Have you tried to setup value field for TextInput component?

As I can see from your example:

<TextInput placeholder="Password" placeholderTextColor="#212121" returnKeyType="go" secureTextEntry ref={input => (this.passwordInput = input)} style={styles.input} />

do not contain value field.