mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 23:12:33 -05:00
validate email/phone submission format
This commit is contained in:
1 parent
8646e17d5a
commit
e6052ad0d8
2 files changed
+11
No files matched your search
@@ -60,7 +60,10 @@ module Params
|
||||
|
||||
type(submitter_params, :name, String)
|
||||
type(submitter_params, :email, String)
|
||||
format(submitter_params, :email, /@/, message: 'email is invalid')
|
||||
type(submitter_params, :phone, String)
|
||||
format(submitter_params, :phone, /\A\+\d+\z/,
|
||||
message: 'phone should start with +<country code> and contain only digits')
|
||||
type(submitter_params, :values, Hash)
|
||||
boolean(submitter_params, :send_email)
|
||||
boolean(submitter_params, :send_sms)
|
||||
|
||||
Reference in new issue
Block a user