[midPoint] Validation for custom extended schema attributes

Andreas Küstner andreas.kuestner at daasi.de
Fri Sep 23 11:56:47 CEST 2016


Hello List!

Is it possible to set own validation for the schema extension attributes
via regex or something similar?

Example:

At import of csv file the fields of the column c2 should look like this
: \d\d-*.-bb-\D\D\D = 99-Frankfurt-bb-Hbf

And on the input field of the user it should also validate the value
before it is send to the resource.

Code could look something like this:


<xsd:element name="custom_personal_number" type="xsd:string"
minOccurs="0" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:appinfo>
                             <a:indexed>true</a:indexed>
<a:displayName>CustomPersonalNumber</a:displayName>
                        <a:displayOrder>130</a:displayOrder>
                        <a:help>The company personal number</a:help>

<a:validation><![CDATA[\d\d-*.-bb-\D\D\D]]></a:validation>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>




Thanks in advance!
Andy



More information about the midPoint mailing list