# Livevalidation

**URL:** <https://www.ruby-forum.com/t/livevalidation/150310>\
**Category:** Rails\
**Created:** [October 7, 2008, 7:02am UTC](https://www.ruby-forum.com/t/livevalidation/150310 "2008-10-07T07:02:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fRAnKEnSTEin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/0ea827/32.png) [@fRAnKEnSTEin](https://www.ruby-forum.com/u/fRAnKEnSTEin)\
**Post date:** [October 7, 2008, 7:02am UTC](https://www.ruby-forum.com/t/livevalidation/150310/1 "2008-10-07T07:02:52Z")

</div>

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
