How can I configure username to only have alphabets (a-z, A-Z), numericals (0-9) and underscores (_) and no other characters...
+1
A:
validates_format_of :username, :with => /^[A-Za-z\d_]+$/
You can change that to be whatever you want, but just using normal rails validations seems appropriate. Above allows digits, A-Z, a-z, and underscores
Jesse Wolgamott
2010-08-18 02:23:21
yep... thanks a lot..! I found out that...
Madhusudhan
2010-08-18 02:29:38
A:
Madhusudhan
2010-08-18 02:28:39