Skip to content

fatiherdogan01/react-native-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-validation

i0100=(input)=>{
	let value=/^0*(?:([0-9]|[1-8][0-9]|9[0-9]|100))$/
	return value.test(input)
	   }
_onBlur(v){
        if(this.i0100(v)){
        this.setState({in1:v})
        }
        else{
        this.setState({in1:''})
   		 Alert.alert('Invalid Value !!')
       	}
      }
  <TextInput 
  onChangeText={(v)=>this.setState({in1:v})}	
  	onBlur={()=>this._onBlur(this.state.in1)}
  	placeholder='Enter value (0-100)'
  	keyboardType='numeric'
  	style={{width:180,height:40}}
  	maxLength = {3}
  	value={this.state.in1}
  	/>

Outputs

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages