About writing custom methods:
http://docs.jquery.com/Plugins/Validation/Validator/addMethod

Jörn

On Wed, Nov 12, 2008 at 7:29 PM, spellingcity <[EMAIL PROTECTED]> wrote:
>
> In this particular case, for example:
>
> current email: [EMAIL PROTECTED]
>
> The field above (sample form field) should only validate the email
> address if it is different than the user's current email address of
> "[EMAIL PROTECTED]".
>
> Where is the documentation for a custom method?
>
> In the meantime, I have worked around the issue by adding a link that
> says "Change Email" which than shows an empty email box which gets
> validated regardless of the email that is entered (even if they enter
> their own).  This way its less confusing to the user, to enter a new
> email address they are required to click something which than shows
> them an empty box.  If they enter the same email address as their own
> account, it will tell them that its already in use, but that's ok.
>
> Thanks
>
> On Nov 12, 5:12 am, "Jörn Zaefferer" <[EMAIL PROTECTED]>
> wrote:
>> How and where do you decide what is valid? Either do it on the
>> serverside, in which case you don't have to modify the clientside
>> logic. Or on the clientside, in this case a custom method that returns
>> (instead of the usual true/false) just a string "dependency-mismatch".
>> That cancels all further validation for that field (same as required
>> dependencies).
>>
>> Jörn
>>
>>
>>
>> On Tue, Nov 11, 2008 at 10:21 PM, spellingcity <[EMAIL PROTECTED]> wrote:
>>
>> > There is a particular scenario where I don't want the remote
>> > validation to actually get executed.  In particular, this is when you
>> > have a field, say a "username" field and the user is editing the field
>> > and the value of the field is their current username.  This is
>> > considered a valid username and remote check shouldn't execute.
>>
>> > Any suggestions?
>>
>> > Thanks- Hide quoted text -
>>
>> - Show quoted text -

Reply via email to