Validate a string in rails? -


how can validate if string? along lines of:

validates :title, format: string  

i've discovered in order validate data inputting contains letters (i guess string in instance), can use following code, validates format of title letters, using regex (the stuff between //).

validates :title, format: {with: /[a-za-z]/} 

Comments

Popular posts from this blog

c# - Sort XmlNodeList with a specific Node value -

Android Java.Lang.RuntimeException : Unable to start activity Component Info -

php - htaccess subdomain and directory redirect -