Mmm i still haven't got this working although I really assume everything is 
set up fine...
Is there a possibility to put in plain javascript into the webskin with 
<script></script>?
I want to play  by "the rules" but this is not productive :(

Op maandag 25 februari 2013 22:07:47 UTC+1 schreef Marco van den Oever het 
volgende:
>
> Ah thanks Chris... yes i studied the docs but made a mistake when entering 
> the code...
>
> Right now in header I have:
>
>  <skin:registerJS id="jquery-validate-additional"
>                     baseHREF=
> "#application.url.webtop#/thirdparty/jquery-validate"
>                     lFiles="additional-methods.js"
>                        bCombine="false" />
>     
>     <skin:loadJS id="jquery-validate-additional" />
>
> in cfc:
>
> <cfproperty ftSeq="6" ftFieldset="" name="captcha" type="string" default=
> "" hint="" ftLabel="Verificatiecode" ftValidation="required,notEqual" />
>
> in additional-methods.js:
>
> jQuery.validator.addMethod("notEqual", function(value, element, param) {
>   return this.optional(element) || value != param;
> }, "De verificatiecode is onjuist.");
>
> but still not working, i do notice that from some point in the 
> additional-methods.js the code is al blue, maybe indicating that the script 
> is not ok and therefore it's not working?
>
> Op maandag 25 februari 2013 20:08:17 UTC+1 schreef Chris Kent het volgende:
>>
>> Marco,
>>
>> From your snippet you have an unwanted </skin:registerJS>
>>
>> Have you looked at 
>> https://farcry.jira.com/wiki/display/FCDEV60/Client+Side+Validation 
>>
>> I do not have access to the code where I used the additional validate 
>> methods but if i remember correclty,
>> - add <skin:loadJS id="jquery-validate-additional" /> in your code to 
>> load the additional valdiation js.
>> - add the validation to the properties, either in the CFC
>> <cfproperty
>>         name="mailaddress" type="string" hint="His Email"
>>         ftSeq="2" ftValidation="required,email,extravalidation" 
>> ftFieldset="General Details" ftWizardStep="Teaser Information" 
>> ftLabel="Email 
>> Address" />
>>
>> or in webskin
>> <skin:loadJS id="jquery-validate-additional" />
>> <cfset stPropMetadata = structnew() /> 
>> <cfset stPropMetadata.mailaddress.ftValidation="required,email,
>> extravalidation" />
>> ...
>> ...
>> ...
>> <ft:object typename="mytypename" lFields="mailaddress" stPropMetadata=
>> "#stPropMetadata#" IncludeFieldSet="false" />
>>
>> Hope this helps,
>>
>> Chris.
>>
>>
>> On Sunday, 24 February 2013 20:14:51 UTC, Marco van den Oever wrote:
>>>
>>> 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: [email protected]
To unsubscribe, email: [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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to