I just did set up validations for User model. The codes in my User model are just like this.
If I’d like to add maximum length validation for each tag, what should I add to this?
I also would like to know shorter way to code those whole validations if possible.
acts_as_taggable_on :tags
validates_presence_of :tag_list,
:message => "Create at least 1 tag"
validates_size_of :tag_list,
:maximum => 4,
:message => '4 tags maximum'
I tried many things, and finally I found out how to solve!
This made it working fine:)