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

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -