Commit Graph

71 Commits

Author SHA1 Message Date
Semigradsky 89759fefde Fix showing multiple error messages 2015-07-09 11:35:52 +03:00
christianalfoni 818b1defbf Initial commit for new version 2015-07-07 19:31:14 +02:00
Christian Alfoni 4279dd59a2 Merge pull request #153 from garbin/master
* Fixed mapModel issue when input name is nested
2015-07-06 11:57:13 +02:00
Garbin Huang 958bd98223 * Fixed mapModel issue when input name is nested 2015-07-01 12:36:45 +08:00
Semigradsky c37c053a66 Made passing all props, except `onSubmit` 2015-06-23 12:54:57 +03:00
christianalfoni d7e7dfc55e Reverted passing of all props, only added autoComplete 2015-05-22 16:20:34 +02:00
christianalfoni a1cf2236df Prepared new release 2015-05-22 14:46:45 +02:00
christianalfoni dbb0653a2b Merge branch 'master' of https://github.com/christianalfoni/formsy-react 2015-05-22 13:21:06 +02:00
christianalfoni 23f91c4373 Pull request for isChanged 2015-05-22 13:21:03 +02:00
Tomas Holas 2ef73a2ec2 Merge remote-tracking branch 'upstream/master' 2015-05-16 13:10:16 +02:00
Alex Vaos 5b2ca883f3 typeo in error message 2015-05-15 10:59:16 -07:00
Tomáš Holas 9ab0acff82 Allow form to be initialised with specified data
Modify reset function so that it accepts argument with data model that the form should be initialised with. This comes handy when you want to edit an object to have the form prefilled with object data by just passing the object to reset function instead of filling the fields manualy.
2015-05-04 22:22:05 +02:00
christianalfoni 37018b10fa Merged pull, fixed equality bug and added tests 2015-04-29 14:57:51 +02:00
christianalfoni 9b2d9598e8 added pull request and created tests and documentation 2015-04-25 12:20:39 +02:00
Erwan Jegouzo 355c0bbee3 don't validate the inputs when the form was not submitted
adding resetForm method
2015-04-22 23:14:24 -04:00
christianalfoni 4267c40f3b Fixed validation errors using callback 2015-04-17 19:36:28 +02:00
christianalfoni 1475dbb88b Fixed required bug 2015-04-15 20:12:40 +02:00
christianalfoni d0af1375a2 Fixed callbacks for onInvalidSubmit and onValidSubmit 2015-04-15 07:28:39 +02:00
christianalfoni 1fb4461121 Removed noValidate and added formNoValidate to readme 2015-04-14 21:31:41 +02:00
christianalfoni 54a857638a Release 0.12.0 2015-04-14 19:01:59 +02:00
christianalfoni 8b42fd254a Added string returns error for rules 2015-04-13 19:15:10 +02:00
christianalfoni c5bbc06178 Added missing pull 2015-04-13 18:43:22 +02:00
christianalfoni b0738a5032 Added validation objects and required validation 2015-04-13 18:29:23 +02:00
christianalfoni 5e00ea281f Passing invalidate on onValidSubmit and onInvalidSubmit 2015-04-13 18:29:22 +02:00
christianalfoni 0964b07e1d Fixed validation bug 2015-04-03 13:20:17 +02:00
christianalfoni 8cbd6e19ff added internal validation 2015-04-01 13:59:52 +02:00
christianalfoni ebd17fde62 Fixed bug with internal ajax 2015-04-01 13:49:38 +02:00
Christian Alfoni eb3eaa6544 Merge pull request #63 from philippotto/checkValidity
Allow a component to decide whether it is valid (fixes #60)
2015-04-01 13:43:18 +02:00
christianalfoni dca9f78524 Handle any value with tests 2015-03-28 23:12:23 +01:00
Philipp Otto 0d34e7b5bb Allow a component to decide whether it is valid (fixes #60) 2015-03-23 00:16:05 +01:00
christianalfoni 86aec656df Fixed dynamic validations, disable form, dynamic value update etc. 2015-03-07 12:51:15 +01:00
christianalfoni d9bf45d417 Added CSRF token handling 2015-03-07 11:12:08 +01:00
Christian Alfoni 6b69c0d8d5 Merge pull request #34 from bryannaegele/master
Added dynamic validation rule support
2015-03-07 10:09:59 +01:00
Stephen Demjanenko a9c4746c21 Check isMounted in setTimeout
This fixes some occasional errors that I would see when causing a form
to unmount.  The unmount would happen before the setTimeout which then
caused setState to be called on an unmounted component.  React throws an
error in this case.

The fix is to check if the component is mounted before running the body
of the setTimeout
2015-03-06 12:19:00 -08:00
Bryan Naegele 7fb17a752d Dynamic validations and requiring
Allow validations to be updated, including requiring
2015-03-02 13:22:11 -06:00
Bryan Naegele 5cc979e249 Dynamic validation support
Add dynamic validation support
2015-03-02 13:08:08 -06:00
Christian Alfoni fa4caa6588 Merge pull request #30 from hahahana/isNumeric
Actually check for invalid floats
2015-02-26 14:15:19 +01:00
Hana Wang 9ef8590f80 Actually check for invalid floats 2015-02-26 04:59:19 -08:00
Christian Alfoni 72a7be5d64 Merge pull request #29 from hahahana/add-csrf-to-header
Attach CSRF token to header if it exists
2015-02-26 13:47:44 +01:00
Hana Wang c15b0a200a Attach CSRF token to header if it exists 2015-02-25 10:51:11 -08:00
Hana Wang a65b2943b0 Allow floats for isNumeric 2015-02-25 10:35:30 -08:00
Bryan Naegele a72838b446 Check if form is mounted before calling setState
Check if form is mounted before set state. Cleaned up calls to prop
functions.
2015-02-23 14:33:06 -06:00
christianalfoni 385263c383 Merged two pull requests 2015-02-23 08:55:36 +01:00
Christian Alfoni bbc6ad38e2 Merge pull request #27 from sdemjanenko/update_pristine_values_on_model
Update form's model if the input is pristine and its value changes; test
2015-02-23 07:39:23 +01:00
Stephen Demjanenko 03bc5a4079 Update form's model if the input is pristine and its value changes; test
This fixes a case where a form initializes with default values loaded
from the server.  If an update comes in from the server and the user has
not touched the field (its pristine) then update the field's value.

This feature will help track if the user has actually made any changes
from the default value that the form was/would have been initialized
with.
2015-02-21 13:00:26 -08:00
Stephen Demjanenko e9310002d1 registerInputs: Support null/undefined children; add test
A lot of react examples have rendering functions which early return null
(such as a closed dropdown).  This method was erroring in that case.
2015-02-21 12:16:46 -08:00
Christian Alfoni 86ba085cc4 onChange, dynamic form elements and bug fix 2015-02-03 15:03:55 +01:00
Christian Alfoni 15b6df9526 Pristine, mapping and tests 2015-01-21 15:16:27 +01:00
FoxxMD 418c833e2d Add method for checking if input has had interaction
* Input state has `isPristine` to represent user interaction
* `isPristine` defaults to `false`
* Is triggered by `setValue` to `true`
* Reset on `resetValue`
* `setFormPristine` sets all form inputs pristine value
* `onSubmit` sets `setFormPristine` false
2015-01-19 15:26:13 -05:00
Christian Alfoni 23bad21119 Merge pull request #13 from smokku/props_callback
Call onSuccess and onSubmitted from props after AJAX response
2015-01-19 18:38:31 +01:00