Something not right here with Kate.

This commit is contained in:
2023-06-21 11:07:34 +01:00
parent 1eb8c2753f
commit d882c1a521
6 changed files with 10 additions and 6 deletions

View File

@@ -2,5 +2,6 @@ class Credential < ApplicationRecord
belongs_to :domain
validates :email, presence: true
validates :email, uniqueness: true
validates :domain_id, presence: true
validates :email, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i , message: "email must be valid"}
end