You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by James Coltman <ja...@majorband.co.uk> on 2001/06/01 13:03:51 UTC
Intake not working in TDK2.1b4?
Have the supported rule attributes been changed in the latest tdk?
I've stepped through the code and it would appear that when parsing the rule
tags in the xml file Intake is now looking for a name and value attribute.
Here is the method from the Rule class:
public void loadFromXML (Attributes attrib)
{
setName(attrib.getValue("name"));
setValue(attrib.getValue("value"));
}
It no longer seems to support the attributes described in the service
documentation such as minLength.
Can anyone shed some light on this?
Cheers,
James
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Intake minLength rule
Posted by James Coltman <ja...@majorband.co.uk>.
As far as I can tell when the minLength rule is set to 1 it will always
return true. i.e
<rule name="minLength" value="1">Please enter a password</rule>
This is because in the assertValidity method in the DefaultValidator the
following branch logic will always be
executed when the value is less than 1 and the field has not been set to be
required.
if ( !required && ( testValue == null || testValue.length() == 0) )
{
return;
}
This means this rule will be classed as valid when the value is less than 1
and it is in fact invalid. Has anyone else come across this problem? The
requirement for this rule has probably been negated by the new 'required'
rule but I thought I should highlight the issue.
Comments?
James :)
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: Intake not working in TDK2.1b4?
Posted by James Coltman <ja...@majorband.co.uk>.
Thanks for this. I thought it was probably something of that type. Intake is
an great service and I just want to get it up and running. :)
James
-----Original Message-----
From: henning@forge.intermeta.de [mailto:henning@forge.intermeta.de]On
Behalf Of Henning P. Schmiedehausen
Sent: 01 June 2001 12:41
To: turbine-user@jakarta.apache.org
Subject: Re: Intake not working in TDK2.1b4?
"James Coltman" <ja...@majorband.co.uk> writes:
>Have the supported rule attributes been changed in the latest tdk?
>I've stepped through the code and it would appear that when parsing the
rule
>tags in the xml file Intake is now looking for a name and value attribute.
>Here is the method from the Rule class:
> public void loadFromXML (Attributes attrib)
> {
> setName(attrib.getValue("name"));
> setValue(attrib.getValue("value"));
> }
>It no longer seems to support the attributes described in the service
>documentation such as minLength.
>Can anyone shed some light on this?
I stumbled on this too, but reading the most official source of
documentation for Turbine (TM), which seems to be the scarab source
code, you use now
<rule name="maxLength" value="80">xxx</rule>
<rule name="mask" value="\d\d?\.\d\d?\.\d\d\d\d">xxx</rule>
and so on. I use this in an application and it works fine.
The documentation is wrong in this point. IMHO, the one who
broke/changed that, should fix the documentation.
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
D-91054 Buckenhof Fax.: 09131 / 50654-20
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Intake not working in TDK2.1b4?
Posted by "Henning P. Schmiedehausen" <ma...@hometree.net>.
"James Coltman" <ja...@majorband.co.uk> writes:
>Have the supported rule attributes been changed in the latest tdk?
>I've stepped through the code and it would appear that when parsing the rule
>tags in the xml file Intake is now looking for a name and value attribute.
>Here is the method from the Rule class:
> public void loadFromXML (Attributes attrib)
> {
> setName(attrib.getValue("name"));
> setValue(attrib.getValue("value"));
> }
>It no longer seems to support the attributes described in the service
>documentation such as minLength.
>Can anyone shed some light on this?
I stumbled on this too, but reading the most official source of
documentation for Turbine (TM), which seems to be the scarab source
code, you use now
<rule name="maxLength" value="80">xxx</rule>
<rule name="mask" value="\d\d?\.\d\d?\.\d\d\d\d">xxx</rule>
and so on. I use this in an application and it works fine.
The documentation is wrong in this point. IMHO, the one who
broke/changed that, should fix the documentation.
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
D-91054 Buckenhof Fax.: 09131 / 50654-20
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org