[opencms-dev] Validation issue for Nested Type

Ashish Shekhar ashish.shekharcsc at gmail.com
Tue Jul 21 10:01:54 CEST 2015


 Hi,

I am setting validation rule for elements which are under tab.

One tab contains Nested elements for which I am trying to set the
validation rule.

Validation are working fine for all elements under tab but validation for
element for nested is not working.

The default value for the nested element is working fine but validation
seems not working.

Can you please help on this? What could be the issue?


<resourcebundle name="my.template.workplace" />
            <tabs>
                <tab element="Heading" collapse="false" name="General" />
                <tab element="Author" collapse="false" name="Author" />
                <tab element="SubMainContent" collapse="true"
name="SubMain" />
            </tabs>
            <defaults>
                <default element="SubMainContent/Title"
value="%(key.title.oceanofsky)" />
            </defaults>
             <validationrules>
                <rule element="Heading" regex=".+" type="error"
message="heading must not be empty." />
                <rule element="Author" regex="\w{3,}.{0,}" type="error"
message="Author name must start with at least 3 characters."/>
                <rule element="SubMainContent/Text" regex=".+" type="error"
message="heading must not be empty." />
 </validationrules>

-Ashish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20150721/1906f331/attachment.htm>


More information about the opencms-dev mailing list