deanlaw / cfcgenerator

Automatically exported from code.google.com/p/cfcgenerator
8 stars 6 forks source link

Default validation for "string" type seems invalid #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

<cfif (len(trim(getlastName())) AND NOT IsSimpleValue(trim(getlastName())))>

It wouldn't get to the IsSimpleValue test if it didn't pass the Trim and
Len calls, which would have thrown an error if the value wasn't a simple value.

Maybe something like the following would be more appropriate?

<cfif (NOT IsSimpleValue(getlastName()))>

The max length check that follows would throw an error as well, as it does
another Len/Trim combo without regard to the results of the previous type
check.

Original issue reported on code.google.com by jc96...@gmail.com on 3 Jul 2009 at 4:52