Jonah Williams
b89c188ecc
`UITextField.text` is now an optional
...
With the Xcode 7 GM release `text` is now an optional despite the documentation stating a default value of "" so we need to unwrap it or provide a default to satisfy the compiler.
2015-09-10 17:16:47 -07:00
Jonah Williams
9b34d138b7
`ValidationError` inherits from `NSObject`
...
`ValidationError` is now an `NSObject` subclass so that `ValidationDelegate` can declare an argument of type `UITextField:ValidationError`. When `ValidationError` is a Swift only class we get a compile error (in Xcode Version 7.0 GM (7A218)):
> Validator.swift:14:10: Method cannot be a member of an @objc protocol because the type of the parameter cannot be represented in Objective-C
Conflicts:
Validator/ValidationError.swift
2015-09-10 17:11:59 -07:00
Jonah Williams
5ed3d8c6ba
Automatic migration to Swift 2.0
...
Converted using Xcode 7.0 GM release (Version 7A218).
2015-09-10 17:09:31 -07:00
Jeff Potter
ca6509687e
Merge pull request #40 from KVTaniguchi/refactorValidationRule
...
apply rules with map and filter
2015-07-20 21:12:53 -07:00
Jeff Potter
dc9224c30f
Merge pull request #39 from KVTaniguchi/RefactorValidator
...
refactor Validator
2015-07-20 21:11:28 -07:00
Jeff Potter
f5376fbeee
Merge pull request #33 from mla2c/master
...
All rules: init with optional user-defined message
2015-07-20 21:10:16 -07:00
Kevin Taniguchi
b95902919b
apply rules with map and filter
2015-06-28 15:55:19 -04:00
Kevin Taniguchi
21a5cc52e2
refactor Validator
...
using type inferencing
loop keys, values in validations
2015-06-28 14:56:40 -04:00
mla2c
4d3f245f7a
Correct conflict
2015-06-12 08:43:19 +02:00
mla2c
d3b92f5a5f
Merge remote-tracking branch 'upstream/master'
2015-06-12 08:36:10 +02:00
Jeff Potter
724a05cf72
Merge pull request #32 from leodasvacas/regex-messages
...
Custom messages for regex rules
2015-06-11 11:00:21 -06:00
mla2c
0edfb58cc4
All rules: init with optional user-defined message possible
2015-06-01 14:54:50 +02:00
mla2c
ba9615cc85
Changes from leodasvacas fork (Custom messages for regex rules, commit 157e9791fb)
2015-06-01 14:13:26 +02:00
Leonardo Yvens
ab2bb9802b
Update README.md
...
Added custom message example. Sanitized SSN example.
2015-05-30 20:03:09 -03:00
leonardo.yvens
157e9791fb
Custom messages for regex rules
2015-05-24 13:12:23 -03:00
Jeff Potter
5a3ddcb795
updating readme, fixing extraneous # in parameter
2015-05-06 13:41:04 -06:00
Jeff Potter
d51e904935
Merge pull request #28 from cameronmccord2/master
...
FloatRule, style transform callback on success/error
2015-05-06 13:27:32 -06:00
Cameron McCord
a685e16bc4
cleaned up code, fixed tests
2015-05-06 11:44:25 -06:00
Cameron McCord
cc0089d901
Changed to passing in transform functions for your text fields
2015-05-06 11:31:49 -06:00
Cameron McCord
afc15b0aa4
colors on text fields get cleared afterwards
2015-05-05 19:21:31 -06:00
Cameron McCord
847885a490
added float rule with tests
2015-05-05 18:58:11 -06:00
Cameron McCord
ab0f1f189d
added test to check that color doesn't change automatically
2015-05-05 18:42:08 -06:00
Cameron McCord
6c93e83a2d
Added test for testing uitextfield border color
2015-05-05 18:38:45 -06:00
Cameron McCord
c6f82a0bea
removed let color
2015-05-05 18:36:12 -06:00
Cameron McCord
ae64d62951
removed color feature
2015-05-05 18:35:23 -06:00
Cameron McCord
4c7462e6a5
Added tests for coloring text fields
2015-05-05 18:32:20 -06:00
Cameron McCord
19490824c3
Error fields auto-set error messages if given, can specify a different text field border color, can have the validator add the colored border to errored text fields
2015-05-05 18:21:35 -06:00
Jeff Potter
cc5e16aedd
Merge pull request #27 from snorpey/deregister-error-fix
...
Fix issue with errors showing up for unregistered fields
2015-05-05 13:03:13 -06:00
Georg Fischer
ffe902dba9
fix issue with errors showing up for unregistered fields
2015-05-05 16:52:08 +02:00
Jeff Potter
34eced2b1e
Merge pull request #26 from cameronmccord2/master
...
Added validate function with callback + tests
2015-04-30 17:59:46 -06:00
Cameron McCord
dfa5c257ce
Added validate function with callback + tests
2015-04-30 17:55:06 -06:00
Jeff Potter
8d25feda3f
Update README.md
2015-04-30 17:46:28 -06:00
Jeff Potter
17c0923537
Merge pull request #17 from zarv1k/swift1.2
...
fixes for compatibility with swift 1.2
2015-04-30 17:43:59 -06:00
Jeff Potter
62c0706d28
Merge pull request #20 from snorpey/deregister-textfield
...
add deregisterField method
2015-04-15 13:37:58 -06:00
Georg Fischer
5fcd1d12e0
add unregisterTextField example to readme
2015-04-15 21:24:46 +02:00
Georg Fischer
18af245f78
add tests for registerField and unregisterField
2015-04-15 21:23:52 +02:00
Georg Fischer
3a68b97a86
rename method to unregisterField
2015-04-15 21:23:10 +02:00
Georg Fischer
edb5f61dda
add deregisterField method
2015-04-15 17:23:28 +02:00
Jeff Potter
f155284c97
Merge pull request #19 from snorpey/readme-fix
...
Update readme to reflect updated ValidationDelegate method name
2015-04-15 08:40:46 -06:00
Georg Fischer
323103e514
Update readme to reflect updated delegate method name
2015-04-15 14:28:43 +02:00
Dmitry Zarva
0497bbbbe0
fixes for compatibility with swift 1.2
2015-04-11 23:26:23 +03:00
Jeff Potter
0c50381640
adding updates to readme and podspec
2015-04-10 15:37:58 -06:00
Jeff Potter
1d93171cb4
updating podspec
2015-04-10 15:06:17 -06:00
Jeff Potter
4dee25a5f5
fixing some formating problems on test
2015-04-10 13:52:17 -06:00
Jeff Potter
0bc6e7a50a
adding tests, refactoring to make easier to understand
2015-04-10 13:50:28 -06:00
Jeff Potter
8a6c7f99cd
Merge branch 'gberger-master'
2015-04-10 10:57:19 -06:00
Jeff Potter
e09ee70c96
Adding max length rule and fixing method access to make it public
2015-04-10 10:55:04 -06:00
Jeff Potter
64eed84b72
Merge branch 'master' of https://github.com/gberger/swift-validator into gberger-master
2015-04-10 10:48:59 -06:00
Jeff Potter
970333e0c0
simplifying method names, adding public access to classes
2015-04-10 10:48:14 -06:00
Guilherme Berger
20f1238e66
Create MaxLengthRule.swift
2015-04-06 04:24:39 -04:00