in icalendar-valtypes, lines 46-50
<xs:element name="freq" type="xcal:FreqRecurType"/>
<xs:sequence>
<xs:choice minOccurs="0">
<xs:element ref="xcal:until"/>
<xs:element ref="xcal:count"/>
</xs:choice>
</xs:sequence>
choice has minoccurs (element is optional). It should also have maxoccurs=1
From rfc5545, page 37
; The UNTIL or COUNT rule parts are OPTIONAL,
; but they MUST NOT occur in the same 'recur'