[jQuery] Re: Validation is not working as expected. Input value deleted!

2008-06-26 Thread Brian J. Fink
Try using String.search(regexp)+1 instead of regexp.test(String). Are you getting legitimate values to fail, or invalid ones to pass? On Jun 20, 7:48 pm, shapper <[EMAIL PROTECTED]> wrote: > Very strange ... it works both ways ... well, what I mean is that I > keep having the same problem in bot

[jQuery] Re: Validation is not working as expected. Input value deleted!

2008-06-20 Thread shapper
Very strange ... it works both ways ... well, what I mean is that I keep having the same problem in both cases. Any more ideas? Did anyone notice that the Validation Examples Forms that have Masking don't work in Firefox 3? Thanks, Miguel On Jun 20, 7:46 pm, "Brian J. Fink" <[EMAIL PROTECTED]>

[jQuery] Re: Validation is not working as expected. Input value deleted!

2008-06-20 Thread Brian J. Fink
@Miguel: It appears you have the RegExp value and the value switched. Maybe you meant: $.validator.addMethod('sqldatetime', function (value) { return value.test(/^(([0-9]{4})-([0-1][0-9])-([0-3][0-9])\s([0-1] [0-9]|[2] [0-3]):([0-5][0-9]):([0-5][0-9])|)$/); }, 'Verifique a data e hora. Use o fo

[jQuery] Re: Validation is not working as expected. Input value deleted!

2008-06-20 Thread Alexsandro_xpt
Hi shapper, do you speak portugues? Please contact me for Validate chat through by e-mail. Thz. On 20 jun, 07:53, shapper <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to validate and mask a text box that should contain a > DateTime in the following format: > > -mm-dd hh:mm:ss > > T