Here is an example using both plugins: http://dev.jquery.com/view/trunk/plugins/validate/demo/marketo/ The second step changes the creditcard mask based on another field: http://dev.jquery.com/view/trunk/plugins/validate/demo/marketo/step2.htm
Jörn On Wed, Jun 18, 2008 at 7:11 PM, shapper <[EMAIL PROTECTED]> wrote: > > Hello, > > I am validating a form but one of the fields has a mask: > 99-99-9999 99:99:99 > > This is: > Day-Month-Year Hour:Minutes:Seconds > > How can I integrate my validation with my mask? > > I am using: > http://digitalbush.com/projects/masked-input-plugin > http://bassistance.de/jquery-plugins/jquery-plugin-validation/ > > I am not sure if these are the right plugins for this ... at least > this is what I have been using. > > Could someone, please, help me out? > > Thanks, > Miguel > > Here is my code: > > // Form mask > jQuery(function($){ > $("#UpdatedAt").mask("99-99-9999 99:99:99"); > }); > > // Form validation > $("#Edit").validate({ > errorClass: "Error", > errorElement: "label", > rules: { > Name: {required: true}, > UpdatedAt: {required: true} > }, > messages: { > Name: {required: "What is your name?"}, > UpdatedAt: { > required: "Insert the updated date and time" > }, > }, > }); >