summaryrefslogtreecommitdiff
path: root/help/app/models
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-01-03 11:19:02 -0800
committerjessib <jessib@riseup.net>2013-01-03 11:19:02 -0800
commit8b6c66af53a1f7e8c4300c17dc226eaef74a89d3 (patch)
tree2bb2a4ddad3348fab9a177c737919c9848699bf1 /help/app/models
parent38c87ba6eb30d8345c9c59b4f9b0d84955543ba0 (diff)
parentbf80482c34034a59307193ced0dcfac7db05f055 (diff)
Merge pull request #11 from leapcode/feature/ticket-client-side-validations
Client-side validations, including only validating email address format ...
Diffstat (limited to 'help/app/models')
-rw-r--r--help/app/models/ticket.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/help/app/models/ticket.rb b/help/app/models/ticket.rb
index a5c9ee5..ef7b2d6 100644
--- a/help/app/models/ticket.rb
+++ b/help/app/models/ticket.rb
@@ -55,7 +55,7 @@ class Ticket < CouchRest::Model::Base
# html5 has built-in validation which isn't ideal, as it says 'please enter an email address' for invalid email addresses, which implies an email address is required, and it is not.
- validates :email, :format => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/, :if => :email #email address is optional
+ validates :email, :allow_blank => true, :format => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/ #email address is optional
#TODO:
#def set_created_by