validates phone champ server side
This commit is contained in:
parent
7faae3a438
commit
090a247ba9
4 changed files with 35 additions and 3 deletions
|
@ -15,4 +15,10 @@
|
|||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::PhoneChamp < Champs::TextChamp
|
||||
validates :value,
|
||||
phone: {
|
||||
possible: true,
|
||||
allow_blank: true,
|
||||
message: I18n.t(:not_a_phone, scope: 'activerecord.errors.messages')
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue