mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-29 17:42:12 +08:00
Skip pydantic validators for optional text params with None/empty values
Optional text params with regex (or other) validators would reject None/"" in request format even though the runtime correctly skips validation for empty optional params. Add optional flag to validator chain so None/"" short-circuit before reaching static validators. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
aedb238c01
commit
ecb803ddae
@@ -0,0 +1,20 @@
|
||||
<tool id="gx_text_optional_regex_validation" name="gx_text_optional_regex_validation" version="1.0.0">
|
||||
<command><![CDATA[
|
||||
echo '$parameter' >> '$output';
|
||||
cat '$inputs' >> $inputs_json;
|
||||
]]></command>
|
||||
<configfiles>
|
||||
<inputs name="inputs" filename="inputs.json" />
|
||||
</configfiles>
|
||||
<inputs>
|
||||
<param name="parameter" type="text" value="" optional="true">
|
||||
<validator type="regex">[0-9.:]+</validator>
|
||||
</param>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="txt" />
|
||||
<data name="inputs_json" format="json" />
|
||||
</outputs>
|
||||
<tests>
|
||||
</tests>
|
||||
</tool>
|
||||
Reference in New Issue
Block a user