ttdung11t2 / react-native-confirmation-code-input

A react-native component to input confirmation code for both Android and IOS
MIT License
411 stars 349 forks source link

My server will return true on successful validation how to do this? #19

Open waheed25 opened 6 years ago

waheed25 commented 6 years ago

I have used this component and my server will return true on successful validation how to do this?

laxusgooee commented 6 years ago

@waheed25 you can do the validation at the onFulFill event. make sure you dont set the 'compareWithCode' attribut

`onCodeEntered = (code) => { //tell the user you are doing some validation //server call... do all your logic here }

...
return (<CodeInput ref="codeInputRef1" secureTextEntry ... onFulfill={(code) => this.onCodeEntered(code) } />) ... `