[opencms-dev] OpenCms 8.5.0: validation rule for nested element

Schliemann, Kai K.Schliemann at comundus.com
Fri Jan 25 12:21:44 CET 2013


Hi list,
it seems that there is another problem with the validation rules in OpenCms 8.5.0.

In my schema I defined the following:
...
<xsd:element name="Email" type="OpenCmsString" />
...
<rule element="Email" regex=" ^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))?$" type="error" message="Error message" />
...

The validation rule does not work.
If I define my element with minOccurs="1" the validation rule works as expected.
<xsd:element name="Email" type="OpenCmsString" minOccurs="1" />
If I am not mistaken, minOccurs="1" is the default value, so I should be able to omit it.

I am not sure, if this bug is already fixed with issue #84 (https://github.com/alkacon/opencms-core/issues/84) so I am mentioning it here.

Does anybody else have the same problem or can confirm this as a bug?

Thanks in advance.
Regards
Kai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 6682 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20130125/7ae391f3/attachment.bin>


More information about the opencms-dev mailing list