method
validate_on_create
![No documentation Importance_0](https://d2vfyqvduarcvs.cloudfront.net/images/importance_0.png?1349367920)
validate_on_create()
protected
Hide source
# File activerecord/examples/validation.rb, line 46 def validate_on_create if attribute_present?("name") && Person.name_exists?(name) errors.add("name", "is already taken by another person") end end