I am wondering how/whether I should expose data
validation information for arguments passed into my
components.

I may be running a risk of being too abstract or re-inventing the wheel, but it seems to me that since you want to use your Rules for two different purposes (to Apply them and to Render them), that you should pull the Rules out of your validation cfc altogether. Also, it is likely that flat variables would not be enough to clearly define your rules -- aside from max and min values is the implied numeric type and the unknown optional/required boolean, for example.


Once your Rules are defined, then you create a handful of cfcs that interpret the Rules:

1) Apply the Rules to the supplied data
2) Render the Rules into a javascript function
3) Render the Rules into an HTML form element

...etc.

And now that I read further in the thread :) ...I see that Jim has already built such a thing, and Matt has pointed me toward the wheel I was reinventing (but the url says "free/articles" and I am asked for my credit card?). Still, I thought this aside from little ol' me might help conceptually. Make the Rules elemental since you want to use them in various contexts.

--

    Ben Curtis
    WebSciences International
    http://www.websciences.org/
    v: 310 478 6648
    f: 310 235 2067






----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to