[opencms-dev] (6b3)validation rules

Bernd Wolfsegger bw at code-create.com
Wed May 25 18:03:58 CEST 2005


On Wednesday 25 May 2005 17:35, MickyW wrote:
> hi,
> I didn't find any documentation related to this feature. There's one code
> sample in the 6.0 demo for xmlcontent :
>    <rule element="Title" regex="!.*[Ee]rror.*"
> message="${key.editor.errormessage.Article.mustnotcontainerror|Hallo
> ${validation.path}}" />
>
> I understand that the rule applies to Title element in the xml file and
> that a regexp is used to check if it contains Error or error
> You can check anything with regular expressions but are there other types
> of rules to handle simple cases like "numbers only" or "10 characters max"

eg

<rule element="Telephone" regex="[0-9]*"
message="${key.editor.errormessage.MyResource.onlynumberserror}
${validation.path}}" />

<rule element="Title" regex=".{1,10}"
message="${key.editor.errormessage.MyResource.maxnumberserror}
${validation.path}}" />

if  I am not wrong.

> which may cover most of the needs?
>
> Mickael
>
>
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev

-- 

[  Code Create
[  Web Content Management and Presentation


[  Bernd Wolfsegger
[  Sun Certified Programmer for Java(TM) 2 Platform


[  Office in Germany
[
[  Lohmeyerstrasse 13
[  10587 Berlin
[  Germany
[  Fon +49 (0)30 26555788
[  Fax +49 (0)30 2651835

[  Office in Kenya
[
[  P.O. Box 890
[  V/Market
[  00621 Nairobi
[  Kenya
[  Mobile +254 (0)720 481053

[  bw at code-create.com
[  http://www.code-create.com/




More information about the opencms-dev mailing list