2018-02-13 18:18:20 +01:00
|
|
|
class Champs::EmailChamp < Champs::TextChamp
|
2024-02-15 09:45:20 +01:00
|
|
|
include EmailSanitizableConcern
|
|
|
|
before_validation -> { sanitize_email(:value) }
|
2024-04-02 11:04:00 +02:00
|
|
|
|
|
|
|
validates :value, allow_blank: true, format: { with: StrictEmailValidator::REGEXP }, if: :validate_champ_value_or_prefill?
|
2018-02-13 18:18:20 +01:00
|
|
|
end
|