Hi Reinhard,

how would you suggest to combine a validation based on
a string datatype (regex) with a validation based on
an integer (range) for the same field???

Thanks
Cassie
--- Reinhard Poetz <[EMAIL PROTECTED]> wrote:

> Murray Cassie wrote:
> > Hi,
> > 
> > we have implemented a range validation like this:
> > 
> > <fd:datatype base="integer"/>
> >             <fd:label>
> >             </fd:label>
> >             <fd:validation>
> >                 <fd:range min="0" max="50000">
> >                     <fd:failmessage>Valid range is
> > between 0 and 50000.</fd:failmessage>
> >                 </fd:range>
> >             </fd:validation>
> > 
> > We get the error message when a number is entered
> that
> > is outside the given range and when a string like
> > "abc" is entered.
> > 
> > Problem: when we enter something like "3abc" this
> is
> > treated like a correct entry. All characters after
> the
> > first that is no number are cut off and only the
> first
> > numbers are evaluated.
> > 
> > This might be wanted behaviour, but not according
> to
> > our spec.
> > 
> > Any suggestions how we can change this???
> 
> As a workaround, add a regexp validation that makes
> sure that only [0-9] is 
> allowed. But the behaviour is strange because the
> datatype "integer" should make 
> sure that only an integer is valid.
> 
> -- 
> Reinhard
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



                
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to