I am having a simple title field for a question in the database.
validate :title, :presence => true, :format => { :with => regex,
:message => "Invalid Title" }
I should make sure that the title of the question doesn't contain only numbers and special characters. It can however contain them along with alphabets. But I should not allow the user to enter only numbers and special characters in the title field.
For example:
Will the temperature cross 40 degrees ?
Is a valid question.
But,
12213232323
?$2112121212
?
are invalid question titles.
What would be the format regex for this?