|{{#if:{{{value|}}}<!--
-->|_11.VALok_{{{value|}}}
|_12.toCHECKforNONEvalBLANKsoCHECKforNONE&BADCODE_<!--
-->{{#if:{{{input-code|}}}
|_21.ZZZorNONEcheck{{#if:{{Str find word|source=option-none|orwords={{{format|}}}}}|_31.optNONE>{{{input-code|}}}<_{{#if:{{ISO 4217/code-none|iso-code={{{input-code|}}}}}|41.NONEok_{{{input-code|}}}|42._NONEnotallowsTOCAT_}}|_32.NOTnoneBADCODEtoCAT>{{{input-code|}}}<_}}
|_22.BLANKin._<!-- blank input do rteturnreturn blank. EOjob
-->}}}}
|{{{value|}}}<!-- no format, so return plain ok-value or blank -->{{{value|}}}}}
<noinclude>
<nowiki>
{{#if:{{Str find word|source=option-none|orwords={{{format|}}}}}
|_OPTNONEyes_{{#if:{{ISO 4217/code-none|iso-code={{{input-code|}}}}}
| _isNONE_{{{input-code|}}}|_todoerr&catcheckNONE_}}<!--
-->
|={{#if:{{{input-code|}}}|_BADCODEIN_CAT|_BLANKcodeINsoBLANKout_}}
}}
}}
{{#switch:{{{value|}}}<!-- correct code OR 'None' OR <blank> -->
|=
|None={{#switch:{{{format|}}}|option-none={{{value|}}}}}
|#default={{{value|}}}
}}<!--
add errortext, ISOcategory IF:
-->{{#if:{{#switch:{{{value|}}}
|={{#if:{{{input|}}}|_ERR1_}}<!-- input did not lead to correct code so error -->
|None={{#ifeq:{{{format|}}}|option-none||_ERR2_}}<!-- None not accepted so error -->
}}|<!--
-->{{{errortext|}}}<!--
-->{{yesno|{{{ISOcat|}}}|yes={{main other|1=[[Category:Pages using Infobox currency with ISO code to check|Code]]|2=[[:Category:Pages using Infobox currency with ISO code to check|ISOcat:nowiki>C*/nowiki>]]}}}}<!--
-->}}
|{ISO 4217/code/format
|input={{{iso-code|}}}
|format={{{format|}}}
|errortext={{{errortext|}}}
|ISO4217-cat={{Str find word|source=iso4217-cat|case=no|orwords={{{format|}}}}}
|is-none={{ISO 4217/code-none|iso-code={{{iso-code|}}}}}
|value=}}</nowiki></noinclude>
|