You can use a condition in the XPath of string-length(.) < 1 combined with
setLength(1-999) that way the string length check will only be applied if
there is no data.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a bug in this area. I believe that you should be able to specify a
length as 1- meaning at least one. This is common behaviour. sadly CAMV insist
on either 1 or 1-999 where a number on its own is regarded as a maxLength and
the number with a dash is regarded as a range. I will raise a bug and get a
new release out by next Monday.
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can I please no how to specify a MinLength check? I have been using setLength
but it can be used for Max or range.
Some examples:
setLength(,1-1)
setLength(,2-15)
etc
ok this is a range check and not minlength check.
setLength(,1-1) indicates that length of the string must be 1 character
setLength(,2-15) indicates that length of the string must be between 2 to 15
characters.
I am looking for a minlength check. It is a common requirement in XML world to
create an element which must possess a value.
Along with Mandatory, Not Nillable, an additional check is required that the
length must be atleast 1 character long.
How do I achieve this?
You can use a condition in the XPath of string-length(.) < 1 combined with
setLength(1-999) that way the string length check will only be applied if
there is no data.
There is a bug in this area. I believe that you should be able to specify a
length as 1- meaning at least one. This is common behaviour. sadly CAMV insist
on either 1 or 1-999 where a number on its own is regarded as a maxLength and
the number with a dash is regarded as a range. I will raise a bug and get a
new release out by next Monday.
Martin
Thanks Martin. Yes I agree setLength should be able to work with "1-" such
that it does not checks for Max. Length.
regards