validation of date_select

K

Kim Quermann

I'm new to ror. I need to check a date in a form.
I'm validating if the datefields (I used a date_select) are empty. In
case they are not all three fiels (d, m, y) get a red background, but
only the selectfield for the day gets red. How can I change the
background of all selectfields?
In a second step I check if the date is allowed (31th of february
isn't). Is it possible to change in this case the backgroundcolor of the
field for the day and the month?
thanks in advance
 
P

Phillip Gawlowski

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kim Quermann wrote:
| I'm new to ror. I need to check a date in a form.
| I'm validating if the datefields (I used a date_select) are empty. In
| case they are not all three fiels (d, m, y) get a red background, but
| only the selectfield for the day gets red. How can I change the
| background of all selectfields?
| In a second step I check if the date is allowed (31th of february
| isn't). Is it possible to change in this case the backgroundcolor of the
| field for the day and the month?
| thanks in advance

A look into the Rails API documentation reveals this:
http://api.rubyonrails.org/classes/ActiveRecord/Validations.html

Though, you might want to ask the Rails community about this and Other
Rails related questions:
www.rubyonrails.com/community

They usually answer faster.

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com

~ "Dad buried in landslide! Jubilant throngs fill streets! Stunned
father inconsolable - demands recount!" -- Calvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgm3W8ACgkQbtAgaoJTgL9w4wCfTJyHdb5U1kCQ9kJPqHH1Akv0
g+YAni0NQtunQFU4636Yz6Gb5cBB4hF/
=Beru
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,204
Messages
2,571,065
Members
47,672
Latest member
svaraho

Latest Threads

Top