I am trying to write my own javascript validation and am looking for some help with writing a function that checks to see if a string contains invalid characters. I have gotten it to work for spaces:
username.include?(' ') but I would like to perform a thorough check for all invalid characters like my user validation: validates_format_of :username, :with => /^[A-Z0-9_]*$/i Im a little confused about the /^[A-Z0-9_]*$/i syntax. Can anyone enlighten me? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---