On Thu, Jun 5, 2008 at 1:21 PM, Jamie Jackson <[EMAIL PROTECTED]> wrote:
> Say a Customer has both a WorkAddress and a HomeAddress (both of these
> are Address records).
>
> When you validate a customer form that has both of these addresses,
> how do you distinguish between the WorkAddress and HomeAddress when
> you use Reactor's validation?

For validating those two records, logic would have that when you're
creating or updating them they would be differentiated somehow.

<cfset workAddress =
reactor.createRecord('address').load(addressID=arguments.workAddressID)
/>
<cfset homeAddress =
reactor.createRecord('address').load(addressID=arguments.homeAddressID)
/>

So with that, after calling your set methods, you would be able to do
<cfset workAddress.validate() /> and <cfset homeAddress.validate() />


> BTW, Reactor validation *is* completely undocumented, isn't it? (I
> want to make sure I didn't miss something.)

Reactor is partially documented:
http://livedocs.reactorframework.com/Reactor_Documentation.htm

> Also, is anybody successfully using Reactor validation for anything
> more than small apps? I'd be interested to know about tips, tricks,
> and/or pitfalls before taking the plunge.

There have been many discussions on validation on various blogs and on
the CFC-Dev mail list. There is also a project that Alagad has:
http://www.alagad.com/go/products-and-projects/validat-data-validation-engine/validat-data-validation-engine

-- 
Matt Williams
"It's the question that drives us."


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to