Can't set mandatory to true in page_excerpt

17 views Asked by At

I have this page_excerpt.xml located under config/forms/ which works fine:

<?xml version="1.0" ?>
<form xmlns="http://schemas.sulu.io/template/template"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://schemas.sulu.io/template/template http://schemas.sulu.io/template/form-1.0.xsd"
>
    <key>page_excerpt</key>

    <properties>
        <section name="teaser">
            <meta>
                <title lang="en">Teaser</title>
            </meta>
            <properties>
                <property name="ext/excerpt/teaserImage" type="single_media_selection">
                    <meta>
                        <title lang="en">Image</title>
                    </meta>
                </property>
            </properties>
        </section>
    </properties>
</form>

Now I want the teaserImage to be mandatory. I change it to mandatory:

<property name="ext/excerpt/teaserImage" type="single_media_selection" mandatory="true">

But after that I am not able to save the excerpt any more. The Admin interface just says "Error - The form contains invalid values"

When I remove the "mandatory" field, it just works fine. Where's the problem?

0

There are 0 answers