question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Field Level Validation not working in android

See original GitHub issue

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>
              }/>

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:3
  • Comments:24 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
mrovacommented, Feb 7, 2017

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",
3reactions
mitch-toficommented, Jan 12, 2017

@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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implement Form Validation (Error to EditText) in Android
When the data filled in the text filed is wrong -> // this gives error message to particular text field // which contains...
Read more >
Android: How can I validate EditText input? - Stack Overflow
I'm using OnFocusChangeListeners to trigger the validation after the user types into each one, but this doesn't behave as desired for the last...
Read more >
Validator | Android Developers
Validator. bookmark_border. Stay organized with collections Save and categorize content based on your preferences. Dismiss
Read more >
Using Flows for Form Validation in Android. | by Shivam Dhuria
The Submit button is only enabled when all the three fields are correctly filled. Setting up Viewmodel. In your Viewmodel, initialize val for...
Read more >
6 Reasons - HTML5 Required Attribute Validation not Working
This is the first and the most common reason that causes the issue. HTML5 required attribute validation doesn't work if the form has...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found