Hi 
.. somebody around who is easy with Reg. Exressions.
For me a nightmare.

I have to Validate this format: 0-0000 0000 and/or 0-0000 0000/0 and/or 
0-0000 0000/00
Would be a great help..

I have got: (^\d-\d{4} \d{4}(/\d{2})?$)|(^I\d{8}$)|(^$)

tried:
validates :project_number, :format => { :with => /(^\d-\d{4} 
\d{4}(/\d{2})?$)|(^I\d{8}$)|(^$)/, :message => "Message"}

But that seems to be not valid.

Thanks

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/0845c172-a691-4924-b883-6c99bdc1a77a%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to