Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

Wrong verifying Code from sms - react native

$
0
0

I have Text Input

<TextInput
            value={''}
            ref={ref => {
              this.refPassword = ref;
            }}
            onChangeText={value => this.handleChange(value)}
            textContentType="oneTimeCode"
            onKeyPress={this.handleKeyPress}
            keyboardType={'number-pad'}
            style={[
              styles.textInput,
              {
                left: selectedIndex * wp('15%'),
                opacity: hideInput ? 0 : 1,
              },
            ]}
          />

handleChange(value) {
this.setState(
  state => {
    return {
      value: (state.value + value).slice(0, CODE_LENGTH.length),
    };
  },
  () => {
    if (this.state.value.length >= CODE_LENGTH.length) {
      this.completePassword();
    }
  },
);

}

But, i receive code from sms is incorrect.

Code from SMS: 113498

Code Autofill: 111113

What am I doing wrong?


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>