LoginSignup
15
12

More than 5 years have passed since last update.

独自validate書いてて、l18nに対応させた

Posted at

あれ、どうすればいいんだ?と一瞬悩んだが、シンプルな話でした。

email_validator.rb
            errors.add(:email, I18n.t('errors.messages.notmatch'))
ja.yml
          messages:
            notmatch: " 確認用メールと一致しません"


15
12
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
12