-
-
Save chucker34/f1c9f8d3d3dda7d6ba02 to your computer and use it in GitHub Desktop.
validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Code < ActiveRecord::Base | |
validates :limit, | |
allow_blank: true, | |
format: { with: /\A(\d{4})-(\d{1,2})-(\d{1,2})\z/, message: "は2015-01-01の形式で入力してください" } | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment