>Why do you suggest using the StructKeyExists?

Because it is the most efficient way to check if the Form scope contains the 
Name field.



>Do you see a problem in doing it this?
>
><cfif form.name NEQ "" AND form.requestname NEQ "">
>...

The main problem is that there is nothing to check/enforce that Name and 
RequestName are defined.
You should use either StructKeyExists or cfparam to ensure you have these 
fields, otherwise you will get an error when the page is accessed directly.

Another issue that the validation can easily be bypassed with just a space.
If you trim() the fields you ensure that you at least have some content (even 
if you don't have full name validation).



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323133
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to