Could this sort of thing be kept as metadata...perhaps in an xml file,
that could then be read and used by both the CFC and your display code?

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Jon Gunnip
> Sent: Friday, November 28, 2003 5:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Exposing Validation rules for a component
> 
> 
> 
> Nando,
> 
> My Validate() routine in my components looks very similar to 
> what you posted in your email.
> 
> The issue is that I want to expose my validation *outside* of 
> my component so that the UI can do some simple validation by 
> creating the approriate size input text boxes and creating 
> some simple JavaScript to do some checking before a form can submit.
> 
> Then, the UI can catch the simplest validation errors which 
> it wouldn't seem appropriate to have to go all the way to the 
> component to throw a validation error.  For example, if a 
> name can be at most 50 characters, I want some easy way for 
> my GUI to make sure the name input text box has an attribute 
> size="50".
> 
> I then also run the Validate() routine inside of the 
> component to ensure that the data that was passed in is 
> valid.  There is some duplication here, but the Validate() 
> routine is much more thorough.
> 
> My question is: What is the best way to expose the most basic 
> validation logic to my UI?  It doesn't seem appropriate to 
> have it locked away just in the component.
> 
> Jon
> 

----------------------------------------------------------
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