Re: Javascript validation - how to add extra validation to form

Marco van den Oever <[email protected]>
Newsgroups gmane.comp.cms.farcry.devel
Message-ID <[email protected]>
Hi Chris, thanks for the info, i have put this code into my header:

    <skin:registerJS id="jquery-validate-additional"
                    baseHREF=
"#application.url.webtop#/thirdparty/jquery-validate"
                    lFiles="additional-methods.js"
                       bCombine="false" />
 </skin:registerJS>

and this is giving me an error:

Start and End Tag has not the same Name [cfoutput-skin:]


I have now added this to my additional-methods.js:

jQuery.validator.addMethod("notEqual", function(value, element, param) {
  return this.optional(element) || value != param;
}, "De verificatiecode is onjuist.");

How do i use this with a specific <ft:form><ft:object> ?

Thanks.

Op zondag 24 februari 2013 18:04:25 UTC+1 schreef Chris Kent het volgende:
>
> Correction:
>
>  <skin:registerJS     id="jquery-validate-additional"
>                     
> baseHREF="#application.url.webtop#/thirdparty/jquery-validate"
>                     lFiles="additional-methods.js"
>                        bCombine="false" />
>                     <cfoutput>
>                     put your extra validation code in here...
>                     </cfoutput> 
>  </skin:registerJS>
>
> On Sunday, 24 February 2013 16:55:43 UTC, Chris Kent wrote:
>>
>> Have you looked at 
>> /core/webtop/thirdparty/jquery-validate/additional-methods.js ? add the 
>> following to your projects or plugins _serverSpecificVarsAfterInit.cfm 
>>
>>  <skin:registerJS     id="jquery-validate-additional"
>>                     baseHREF=
>> "#application.url.webtop#/thirdparty/jquery-validate"
>>                     lFiles="additional-methods.js"
>>                        bCombine="false" />
>>
>> See https://farcry.jira.com/wiki/display/FCDEV60/Client+Side+Validation 
>>
>> Have not tried the following but it should work, to add any extra 
>> validation directly to the /cache JS file.
>>  <skin:registerJS     id="jquery-validate-additional"
>>                     
>> baseHREF="#application.url.webtop#/thirdparty/jquery-validate"
>>                     lFiles="additional-methods.js"
>>                     <cfoutput>
>>                     put your extra validation code in here...
>>                     </cfoutput> 
>>                        bCombine="false" />
>>
>>
>> Chris.
>>
>>
>> On Sunday, 24 February 2013 16:24:00 UTC, Marco van den Oever wrote:
>>>
>>> Of course i can set it in jquery.validate.js :) Case solved...
>>>
>>> Op zondag 24 februari 2013 15:25:55 UTC+1 schreef Marco van den Oever 
>>> het volgende:
>>>>
>>>> Hi all, in my form I want to check if a entered value is matching the 
>>>> verification code that is displayed for the user to fill in.
>>>> So do i have to add this validation in validation.js or can i do 
>>>> something fancy with ftvalidation?
>>>>
>>>> Thanks!
>>>>
>>>

-- 
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev-/[email protected]
To unsubscribe, email: farcry-dev+unsubscribe-/[email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
--- 
You received this message because you are subscribed to the Google Groups "farcry-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/groups/opt_out.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.