Questions tagged [formsy-react]

A form input builder and validator for React JS.

A form input builder and validator for React JS.

What you can do:

  • Build any kind of form element components. Not just traditional inputs, but anything you want and get that validation for free

  • Add validation rules and use them with simple syntax

  • Use handlers for different states of your form. Ex. "onSubmit", "onError", "onValid" etc.

  • Pass external errors to the form to invalidate elements

  • You can dynamically add form elements to your form and they will register/unregister to the form

22 questions
5
votes
1 answer

Get an inputs component props onBlur

Is it possible to get the props of an input with the onBlur event? With event.target.value I get the value of my input. Is it possible to get the props of the component a similar way?
Hevar
  • 1,249
  • 1
  • 11
  • 23
2
votes
0 answers

React doesn't update states when using formsy-react

I am using formsy-react to handle validation of my input fields. Problem is that I can't update states. I followed example on formsy github page and validation is working but problem is that states are incorrect. They are always one step (or few)…
jureispro
  • 1,152
  • 5
  • 19
  • 39
2
votes
2 answers

using mixins of a react component in es6 style

I am using a component :- https://github.com/christianalfoni/formsy-react, for creating forms. I am trying create one of my own component of input. So as mentioned i need to use formy's mixin. But unfortunately there is no support of it in es6…
user2696466
  • 610
  • 1
  • 11
  • 29
1
vote
1 answer

How to do so that my field must at least be able to contain only numbers and a + in front of the number (if the user wishes)

For example the user can enter: +444123454656656 OR 123454656656 - only numbers or a + in front of the number.
Alexandre
  • 11
  • 5
1
vote
1 answer

Input validation with formsy-semantic-ui-react not working properly

I am using formsy-semantic-ui-react npm package for input validations but it's not working properly, see that red alert error label that is not hiding even I have erased value.
1
vote
0 answers

React. Formsy-react and checkboxes

In my react app I have generic Input component: class Input extends Component { constructor(props) { super(props); if (props) { this.state = { elementType: props.elementType, …
Michael Kostiuchenko
  • 2,791
  • 3
  • 7
  • 18
1
vote
0 answers

formsy-react how to tell which validation invalidated the input

i have this form component (in typescript) that uses 'formsy-react'. after submitting with invalid form, i'm able to receive the names of the invalid fields (variable 'fieldsWithErrors' in 'onInvalidSubmit'). what i need is, in case of multiple…
1
vote
0 answers

Getting "Cannot read property 'attachToForm' of undefined" after upgrading to the latest packages

I have been stuck after upgrading to formsy-material-ui (0.4.0), formsy-react (0.18.0) and material-ui (0.15.0-beta.1) to latest versions, always getting Cannot read property 'attachToForm' of undefined before upgrading the modules, all was working…
Mohammad Arif
  • 6,005
  • 3
  • 33
  • 40
1
vote
2 answers

Material UI - muiTheme.prefix is not a function issue

I have recently migrated to Google Material UI (Material UI v0.15.0-beta.1) from v0.14.4, due to latest reactjs v15.0.1, have also upgraded the formsy-material-ui and formsy-react wrapper for form validations. It's a big code architecture, apologies…
Mohammad Arif
  • 6,005
  • 3
  • 33
  • 40
0
votes
1 answer

monkey patching a function used in formsy-react library

I use formsy-react v1.1.5 for validation and i have about 100 input field and its unbelievably slow because of an unnecessary object.assign function in their code. I know that the higher versions fixed this issue but i can not update it right now. I…
Tarek
  • 13
  • 2
0
votes
1 answer

Submit onBlur function only when the input is valid

I'm using input from formsy-semantic-ui-react for form validation and how can i run the onBlur function only when the field is valid? There is a isValid() function in formsy-react, this.props.isValid() but how i call this function in the input from…
Fire Hand
  • 21,886
  • 22
  • 48
  • 73
0
votes
0 answers

formsy-react and react-datepicker not working together

I have a formsy form with a bunch of Inputs. I can see the value of those inputs in the onValidSubmit function. One example of such an input is the following:
0
votes
1 answer

React Form: Form Input requires a name property when used

I have created a form using formsy-react-2 but it's not working. I am getting Error: Form Input requires a name property when used I am new on React JS I did not know which package is best when working with forms in React JS. Please give me some…
Shahzad Farukh
  • 147
  • 1
  • 1
  • 13
0
votes
1 answer

onChange not working with react Formsy

I am using react formsy(https://github.com/formsy/formsy-react). Following is my code, in this handleChange is not working. If i use simple select then it works I need to get value on change to get cities.
Sandhu
  • 189
  • 2
  • 19
0
votes
1 answer

Run Formsy validation manually

I am using a checkout overlay from PayPal as described here. In order to trigger, there is a form which will be validated via formsy-react, the form itself works fine. Now, I need to fire the formsy validation manually, because the PayPal-Button…
corax228
  • 425
  • 3
  • 11
1
2