It should be possible to easily define email fields in models and schemas. Both fields implementation should contribute the right validation logic in order to ensure that only valid emails are accepted.
Email model field definition:
class User < Marten::Model
field :contact_email, :email, blank: true, null: true
end
Email schema field definition:
class UserSchema < Marten::Schema
field :contact_email, :email, required: false
end
Description
It should be possible to easily define email fields in models and schemas. Both fields implementation should contribute the right validation logic in order to ensure that only valid emails are accepted.
Email model field definition:
Email schema field definition: