It happens when I am trying to add a new publishing rule to a container on the main page. When I pick the rule for the container the form generated by farcry comes up to take the rule parameters then if I put an invalid parameter it goes through the validation and will eventually throw an exception in the BeforeSave because of the invalid input.
I also added an email field type to my rule just to try it out. The email validation works however the validation advice it displays is not what is defined in the email.cfc's validation. It seems javascript checks the email on the client side. Szabolcs On Thu, Aug 5, 2010 at 9:16 PM, Blair McKenzie <[email protected]> wrote: > Is this happening for the default edit form in the webtop, or in one of > your own pages? > > Blair > > > > On Fri, Aug 6, 2010 at 5:22 AM, Szabolcs <[email protected]> wrote: > >> Hi there, >> >> I am trying to do a custom validation on a field in my publishing >> rule, but the validation let pass any value. >> >> This is what I did. >> 1.) I set up a cfproperty in the rule like this. >> <cfproperty ftSeq="1" ftFieldset="General" name="channel" >> type="string" ftType="myFieldType" hint="The channel name" >> required="true" ftLabel="Channel Name" /> >> >> 2.) I created myFieldType.cfc in plugins/myplugin/packages/formtools/ >> >> 3. ) I overrode the validate function in the above file and at this >> point it only contains this >> <cfset var stResult = structNew()> >> <cfset stResult.bSuccess = false> >> <cfset stResult.Value = ""> >> <cfset stResult.stError = StructNew()> >> <cfset stResult.stError.message = 'Error Message'> >> <cfset stResult.stError.class = 'validation-advice'> >> <cfreturn stResult> >> so the validation should fail all the time and I should get the 'Error >> Message' . >> Well it never happens. >> >> I checked the validate function is actually gets called from /farcry/ >> core/tags/formtools/processformobjects.cfm (line 506), but it seems >> after the call only stResult.Value is used and the rest of the >> structure is discarded. >> >> >> What am I doing wrong? >> Any help is appreciated. >> Thank you, >> Szabolcs >> >> -- >> You received this message cos you are subscribed to "farcry-dev" Google >> group. >> To post, email: [email protected] >> To unsubscribe, email: >> [email protected]<farcry-dev%[email protected]> >> For more options: http://groups.google.com/group/farcry-dev >> -------------------------------- >> Follow us on Twitter: http://twitter.com/farcry > > > -- > You received this message cos you are subscribed to "farcry-dev" Google > group. > To post, email: [email protected] > To unsubscribe, email: > [email protected]<farcry-dev%[email protected]> > For more options: http://groups.google.com/group/farcry-dev > -------------------------------- > Follow us on Twitter: http://twitter.com/farcry > -- 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
