Select to view content in your preferred language

Detect empty parameters in ToolValidator?

965
2
12-07-2011 08:25 AM
JamesHook
Deactivated User
This may be a dumb question, but how do you determine in the ToolValidator class whether an input parameter has been left blank?

Some of the parameters in my tool are optional in some cases, and required in others.  I would like to raise an error when a field is left blank under certain circumstances.
Tags (2)
0 Kudos
2 Replies
LoganPugh
Frequent Contributor
if not self.params[0].value:
   <add some error message>
0 Kudos
JamesHook
Deactivated User
Thanks for your help!
0 Kudos