Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

各モデルへバリデーションの追加 #185

Open
Kunado opened this issue Dec 3, 2018 · 0 comments
Open

各モデルへバリデーションの追加 #185

Kunado opened this issue Dec 3, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@Kunado
Copy link
Collaborator

Kunado commented Dec 3, 2018

追加機能

  • 各モデルにバリデーションを追加しておきたい
    • Railsバリデーションまとめ - Qiita
    • 機能 名前
      値の存在確認 presence
      値の非存在確認 absence
      値の一意性 uniqueness
      数値検証 numericality
      文字列長検証 length
      正規表現フォーマット format
  • なお値を空にしたくない場合はmodelでのpresence指定とDBでのNOT NULL指定のどちらもつけておいたほうが良いらしい。
@Kunado Kunado added the enhancement New feature or request label Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant