redux-form: Field Level Validation not working in android
i am using redux-form 6.4.1 for field level validation. i am using my own component in FIELD. it’s working perfectly for IOS bt not working for android.
i got the error
it works good if i remove validation my code is
<Field
name="myname"
validate={[ required ]}
component={myname =>
<View>
<SegmentedControls
options={ product_myname }
selectedIndex={myname.input.value}
extractText={ (option) => option.name }
onSelection={ (value)=>{
myname.input.onChange(value.taste_id);
}}
tint= {StyleCommon.COLOR_GREEN}
selectedTint= {StyleCommon.COLOR_WHITE}
notSelectedTint= {StyleCommon.COLOR_TITLE}
borderColor={StyleCommon.COLOR_BORDER}
/>
<View style={styles.errorCard}>
{ myname.meta.touched && ((myname.meta.error && <Text style={styles.error}>{myname.meta.error}</Text>) )}
</View>
</View>
}/>
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 3
- Comments: 24 (1 by maintainers)
Commits related to this issue
- Field Level Validation not working in android #2381 — committed to mrova/redux-form by mrova 7 years ago
- fall back to sync validation until field level is fixed https://github.com/erikras/redux-form/issues/2381 — committed to daose/react-native-template by daose 7 years ago
Thank you, everyone, for your help.
I’ve managed to handle it by adding at the very beginning of my index.android.js file the following lines:
Running on the following packages versions:
@nilaybrahmbhatt, ideally @erikras would just update the npm package to use the loose settings, that way you can rely on npm for pulling down updates etc.
however if you need to get something live ASAP, the easiest solution would be to pull down the source and include in your project, keep it seperate from your src folder. once @erikras updates npm, you can remove that folder and continue as normal
@cmjartan Yes. iOS 8 is also failing.