Hi,

I'm relatively new to RoR so pardon if this is a really stupid
question. I have a text field where people will be entering a
username. I need to figure out a way to either

1. validate the field so that it will not be accepted unless they've
entered all uppercase letters for their username -- less ideal
2. regardless of what they enter in the field (uppercase or lowercase)
I need to convert the username value to uppercase before it's stored
in the database.

Here is my form:

<% form_for(@post) do |f| %>
  <%= f.error_messages %>

  <fieldset>
  <legend>Enter Details</legend>

  <div>
    <%= f.label :username,'Enter your username:' %>
    <%= f.text_field :username, :size => 40 %>
  </div>

  <div>
    <%= f.submit "Save", :class => "submit" %>
  </div>

  </fieldset>

<% end %>


Thanks so much for any assistance! I greatly appreciate any help.

-- 
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