Stephen Demjanenko
bade05b9cd
Fix bug: Allow value === false to be passed
...
This is necessary to make a checkbox input work. Without this change,
value would be set to '' in this case. Add a test.
2015-03-14 09:45:33 -07:00
Christian Alfoni
2c64535522
Update package.json
2015-03-09 17:22:53 +01:00
Christian Alfoni
ba71d27135
Merge pull request #41 from jonaswindey/patch-2
...
Add repository to package.json (prevents npm WARN)
2015-03-09 17:21:54 +01:00
Jonas Windey
51bdf8da4f
Add repository to package.json (prevents npm WARN)
...
This prevents the npm warning:
```
npm WARN package.json formsy-react@0.8.0 No repository field.
```
2015-03-09 08:46:28 +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
Christian Alfoni
d04bae94f9
Merge pull request #38 from sdemjanenko/settimeout_check_mounted
...
Check isMounted in setTimeout
2015-03-07 09:51:05 +01:00
Christian Alfoni
5323d08802
Merge pull request #39 from snario/patch-1
...
Move React to peerDependencies
2015-03-07 09:31:44 +01:00
Liam Horne
cef4495d41
Move React to peerDependencies
...
Using this package and `react` with `npm` causes both scripts to be loaded twice. Peer dependencies is meant to fix this.
See http://blog.nodejs.org/2013/02/07/peer-dependencies/
2015-03-06 19:54:29 -05: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
Christian Alfoni
cf93061296
Merge pull request #28 from hahahana/isNumeric
...
Allow floats in isNumeric
2015-02-26 13:45:42 +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
Christian Alfoni
084aa0772a
Merge pull request #26 from sdemjanenko/support_null_children
...
registerInputs: Support null/undefined children; add test
2015-02-23 07:33:35 +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
0834810d67
typo
2015-01-21 15:23:35 +01:00
Christian Alfoni
f0faede640
Mapping documentation
2015-01-21 15:21:21 +01:00
Christian Alfoni
15b6df9526
Pristine, mapping and tests
2015-01-21 15:16:27 +01:00
Christian Alfoni
a008b1ce8d
Merge pull request #16 from FoxxMD/master
...
Add method for checking if input has had interaction
2015-01-21 10:00:01 +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
1ec5868f64
Fixed bug with handlers in ajax
2015-01-19 18:41:40 +01: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
Tomasz Sterna
196bba3fda
Call onSuccess and onSubmitted from props after AJAX response
2015-01-19 14:08:40 +01:00
Christian Alfoni
80227cc50f
Added setState documentation
2015-01-17 21:55:18 +01:00
Christian Alfoni
05e3688c8b
Added setState documentation
2015-01-17 21:53:05 +01:00
Christian Alfoni
7c95bf191a
Update README.md
...
Documented the value attribute
2015-01-17 09:40:17 +01:00
Christian Alfoni
4127480839
Merge pull request #8 from smokku/empty_headers_forEach
...
Fixed exception on trying to forEach empty request headers
2015-01-16 17:30:12 +01:00
Christian Alfoni
7163b30246
Merge pull request #9 from smokku/nonJSON__response
...
Fixed uncaught exception on parsing non-JSON AJAX response
2015-01-16 17:29:33 +01:00
Tomasz Sterna
94e69e7dc0
Fixed exception on trying to forEach empty request headers
2015-01-16 16:04:55 +01:00
Tomasz Sterna
24b9110a62
Fixed uncaught exception on parsing non-JSON AJAX response
2015-01-16 16:00:48 +01:00
Christian Alfoni
b8c4414976
Merge branch 'master' of https://github.com/christianalfoni/formsy-react
2015-01-15 12:24:56 +01:00
Christian Alfoni
9e430bbf83
Fixed bug with empty validations
2015-01-14 10:32:31 +01:00
Christian Alfoni
e9743a2df1
Cross input validation, invalidateForm and bug fix
2015-01-14 10:15:49 +01:00
Christian Alfoni
7830defb34
Update README.md
2015-01-07 15:02:36 +01:00
Christian Alfoni
d813f2ade8
Update README.md
2015-01-07 15:01:36 +01:00
Christian Alfoni
915ddb8cee
Fixed required and no validations bug
2015-01-07 11:06:01 +01:00
Christian Alfoni
63938025fa
Removed onCancel
2015-01-07 09:53:17 +01:00
Christian Alfoni
b04c989cf6
Release 0.4.0
2015-01-07 07:28:15 +01:00
Christian Alfoni
dc6ac20285
Merge pull request #6 from LaustAxelsen/patch-2
...
words, spaces and special letters.
2015-01-07 07:09:18 +01:00