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

Custom validate cannot be used with isValidValue #466

Open
birjj opened this issue Jul 27, 2017 · 0 comments
Open

Custom validate cannot be used with isValidValue #466

birjj opened this issue Jul 27, 2017 · 0 comments

Comments

@birjj
Copy link

birjj commented Jul 27, 2017

While components can have their own validate functions, said methods have no way of getting the value passed to isValidValue.

const MyOwnInput = React.createClass({
  mixins: [Formsy.Mixin],

  validate() { return !!this.getValue(); },

  test() {
    console.log(this.isValidValue(0)); // false
    console.log(this.isValidValue(1)); // false - should be true
  }

  // ...
});

JSFiddle

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

1 participant