rails-alpha_numeric_validator 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ class AlphaNumericValidator < ActiveModel::EachValidator
|
|
7
7
|
PUNCTUATION_REGEXP = {
|
8
8
|
default: /(?:[[:alpha:]]|[[:digit:]])+/,
|
9
9
|
:true => /(?:[[:graph:]])+/,
|
10
|
-
limited: /(?:[[:alpha:]]|[[:digit:]]|[_
|
10
|
+
limited: /(?:[[:alpha:]]|[[:digit:]]|[_:\+\.\?,\-!'\/#])+/, # ' vim-color-syntax hack
|
11
11
|
dns: /(?:[[:alpha:]]|[[:digit:]]|-)+/,
|
12
12
|
fqdn: /(?:[[:alpha:]]|[[:digit:]]|-|\.)+/}
|
13
13
|
|
@@ -51,7 +51,7 @@ class AlphaNumericValidatorTest < Test::Unit::TestCase
|
|
51
51
|
:server_name => 'hello-world', :website => 'hello-world.example.com', :id_code => 'abc123')
|
52
52
|
assert @model.valid?
|
53
53
|
validations = {name: [['Bob1 Jones2', 'abcdef'], ['Bob# Jones?', '!@#$!@']],
|
54
|
-
organization: [["McDonald's", 'Yahoo!', 'ABC-DEF + GHI'], %w(A@B XYZ~3)],
|
54
|
+
organization: [["McDonald's", 'Yahoo!', 'ABC-DEF + GHI', 'with: colons'], %w(A@B XYZ~3)],
|
55
55
|
favorite_quote: [['This$is=a& good*string', '~!@#$%^&*()'], %W(Hello\x00)],
|
56
56
|
server_name: [%w(hello1 abcdef), ['hello world', 'hello~world']],
|
57
57
|
website: [%w(abc123.example.com example.com), ['he llo.example.com', 'my@site.com']],
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: rails-alpha_numeric_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Paul Belt
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|