On Fri, Aug 17, 2012 at 12:39 AM, Peter Cock <p.j.a.c...@googlemail.com> wrote:
> On Fri, Aug 17, 2012 at 12:18 AM, Dan Tenenbaum <dtene...@fhcrc.org> wrote:
>> Hello, I have the following wrapper:
>> <tool id="foo" name="foo" version="0.99.0">
>>   <description>foo</description>
>>   <command interpreter="python">
>>       tool.py $outputFileName
>>   </command>
>>   <inputs>
>>       <param name="tp" type="text" label="label" help="help" 
>> optional="false"/>
>>   </inputs>
>>   <outputs>
>>       <data format="csv" name="outputFileName"/>
>>   </outputs>
>> </tool>
>> I expect that when I click "Execute" I will be told that "tp" must
>> have a value. However, that doesn't happen, it just goes ahead and
>> executes the script.
>> How do I get Galaxy to require that a text param have a value?
>> Thanks,
>> Dan
> Probably is has the value of an empty string? That seems
> logical but unhelpful - and explains the behaviour ;)

OK. I'll buy that. But perhaps when type="text", optional="false"
should treat the empty string as though there is no value.

> You can probably use a validator in the XML for this (e.g. insist
> on at least one character).

This worked for me:
      <param name="tp" type="text" label="label" help="help">
          <validator type="empty_field" message="don't leave the field empty!"/>

Thanks very much!

> Peter
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:


Reply via email to