How to call getFormName

16 views
Skip to first unread message

CFMitrah from @MitrahSoft

unread,
Jan 10, 2014, 9:54:56 AM1/10/14
to valida...@googlegroups.com
I am newbie to validatethis. I want to get the form name from context. I am using below code, 

<cfset application.ValidateThis = createObject("component","ValidateThis.ValidateThis").init(ValidateThisConfig) />
<cfset formName = application.ValidateThis.getFormName(Context=Form.Context) />

This gave me below error,

Type: ValidateThis.ValidateThis.ObjectTypeRequired
Details: You must pass either an object type name (via objectType) or an actual object when calling a method on the ValidateThis facade object.
 

John Whish

unread,
Jan 10, 2014, 3:52:16 PM1/10/14
to valida...@googlegroups.com
Contexts related to the object being validated, so ValidateThis doesn't know which object you mean. There's a bit more info about using the Facade here http://www.validatethis.org/docs/wiki/ValidateThis_Facade_Object.cfm

I hope that helps


--
You received this message because you are subscribed to the Google Groups "ValidateThis" group.
To unsubscribe from this group and stop receiving emails from it, send an email to validatethis...@googlegroups.com.
To post to this group, send email to valida...@googlegroups.com.
Visit this group at http://groups.google.com/group/validatethis.
For more options, visit https://groups.google.com/groups/opt_out.

CFMitrah from @MitrahSoft

unread,
Jan 17, 2014, 8:59:20 AM1/17/14
to valida...@googlegroups.com, john....@googlemail.com
Thanks a lot John. After passing the objectType, it is working fine.

<cfset formName = application.ValidateThis.getFormName(objectType="user",Context=Form.Context) /> 

Reply all
Reply to author
Forward
0 new messages