rails model validation string length code example Example: length validation rails validates :column_name, length: { minimum: 3 }