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 15870993_1530927493601916_588478441_n

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

Most upvoted comments

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:

import 'core-js/es6/symbol';
import 'core-js/es6/array';

Running on the following packages versions:

"react-native": "0.39.2",
"redux": "^3.6.0",
"redux-form": "^6.5.0",
"core-js": "^2.4.1",

@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.