2009/6/18 Newb Newb <[email protected]>:
>
> Is there any regualar expressions,which Should not allow blank space as
> the first character for my Department Name field.
> any helps on this...

If you just want to check that the first character of the string is
not space (as opposed to stripping off leading whitespace) just check
the first character using fieldname[0].  Depending on your
requirements it may be more user friendly just to strip off whitespace
using strip or strip!

Colin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to