Forum: Ruby on Rails livevalidation

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
482517e3e7f1be3c858dbdb4b8f288a1?d=identicon&s=25 fRAnKEnSTEin (Guest)
on 2008-10-07 07:02
(Received via mailing list)
Hi,

I am using livevalidation for validating a form in the client side. I
only got one problem, in my form i need to validate  check-in and
check-out dates, so for example the the check-out date must be greater
than the check-in date ect. does livevalidation provide something for
this kind of validation?

There is one function called "Custom" acording to the livevalidation
site i can use this function to create my owm custom validation
functions, but when i used the example that is in the site it does not
work for me, does not show any error message, this is the code:

// Pass a function that checks if a number is divisible by one that
you pass it in args object
// In this case, 5 is passed, so should return true and validation
will pass
Validate.Custom( 55, { against: function(value,args){ return !(value %
args.divisibleBy) }, args: {divisibleBy: 5} } );

I put instead 55 for example 57 and so on with other test, any of them
popups any error message. Do you have any idea of how can i solve my
date validation problem?

Regards
This topic is locked and can not be replied to.