Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger validation on button clcik #23

Open
DalbirKaur opened this issue Nov 1, 2018 · 1 comment
Open

Trigger validation on button clcik #23

DalbirKaur opened this issue Nov 1, 2018 · 1 comment

Comments

@DalbirKaur
Copy link

I am unable to show validation message on button click. Kindly let me know how can I achieve this.

@Q8hma
Copy link

Q8hma commented Dec 22, 2018

this code will work


  // Returns the values of the fields and auto Validate
  getValuesValidate() {
    const values = {};
    Object.keys(this.state.fields).forEach((fieldName) => {
      const field = this.state.fields[fieldName];
      if (field) {
        values[field.name] = field.value;
      }
      this.onValueChange(field.name,field.value);
    });
    return values;
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants