Skip to main content

BIN 7bIhK Documentation

  • Author:

  • Version: 14

  • Description: Examples from "Form Optional / Required" section of the form reference: form.mustvalue - a schema-optional field is *displayed* as required when form.mustvalue=true

  • Created: 2014-10-05

  • Modified: 2015-05-23

  • Source:

     Edit Bin W3C Schema Json-Schema Java Bean Code Default Value as XML

    Printers Embed Responsive

    <complexType name='Form' description='Examples from "Form Optional / Required" section of the form reference: form.mustvalue - a schema-optional field is *displayed* as required when form.mustvalue=true'>
    	
    	<field name='FieldIntOptional' minOccurs='0' type='MyInput' extra:form.explanation='Standard optional field with maybenull=true, value space does not admit the empty string' extra:form.maybenull='true'/>
    	<field name='FieldIntOptionalMustValueTrue' minOccurs='0' type='MyInput' extra:form.mustvalue='true'  extra:form.maybenull='true' extra:form.explanation='Optional field with form.mustvalue=true and form.maybenull=true, is displayed and can not be submitted empty' />
    	<field name='FieldIntOptionalMustValueTrueNoMayBeNull' minOccurs='0' type='MyInput' extra:xform.mustvalue='true'  extra:form.maybenull='false' extra:form.explanation='Optional field with form.mustvalue=true and form.maybenull=false, is not displayed and so can be submitted empty, form.mustvalue does not work here' />
    </complexType>
    
    <simpleType name='MyInput' type='xs:int' extra:ctrl.emptyisnull='true'/>