<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Ashish,<br>
      <br>
      you need to move the validation rule for your nested element to
      the included .xsd, so in the same file where <xsd:element
      name="Text" type="OpenCmsString" /> is defined.<br>
      <br>
      Best,<br>
      Tobias<br>
      <br>
      Am 21.07.2015 um 08:01 schrieb Ashish Shekhar:<br>
    </div>
    <blockquote
cite="mid:http:%2F%2Fpermalink.gmane.org%2Fgmane.comp.cms.opencms.devel%2F40090@localhost.localdomain"
      type="cite"><base
        href="http://permalink.gmane.org/gmane.comp.cms.opencms.devel/40090">
      <title>Validation issue for Nested Type</title>
      <base
        href="http://permalink.gmane.org/gmane.comp.cms.opencms.devel/40090">
      <pre> 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
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a>



</pre>
    </blockquote>
    <br>
  </body>
</html>