Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F886095
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 8, 8:44 PM
Size
443 B
Mime Type
text/x-diff
Expires
Sun, Aug 10, 8:44 PM (15 h, 18 m)
Engine
blob
Format
Raw Data
Handle
246049
Attached To
rARCHIVING archiving
View Options
diff --git a/lib/name_validator.rb b/lib/name_validator.rb
index d8a7527..6ffbb37 100644
--- a/lib/name_validator.rb
+++ b/lib/name_validator.rb
@@ -1,7 +1,7 @@
class NameValidator < ActiveModel::Validator
def validate(record)
- unless record.name =~ /^[a-zA-Z0-1\.-_ ]+$/
+ unless record.name =~ /^[a-zA-Z0-9\.\-_ ]+$/
record.errors[:name] << "Can only contain numbers, letters, space, '.', '-' and '_'"
end
end
end
Event Timeline
Log In to Comment