Skip to content

Commit

Permalink
Merge pull request #2 from CQQL/rails-4
Browse files Browse the repository at this point in the history
Fix format validation regex
  • Loading branch information
schorsch committed Jul 7, 2014
2 parents c75a524 + 451c543 commit 60729fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/king_tokens/token_code.rb
Expand Up @@ -10,7 +10,7 @@ class TokenCode < ActiveRecord::Base
before_create :set_token

validates_presence_of :name
validates_format_of :name, :with => /^[a-zA-Z0-9\_\-]+$/
validates_format_of :name, :with => /\A[a-zA-Z0-9\_\-]+\z/
validates_uniqueness_of :name, :scope => [:object_id, :object_type] #second not really needed if uuid

def to_s
Expand Down

0 comments on commit 60729fb

Please sign in to comment.