You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Masakazu Ikezawa (JIRA)" <ji...@apache.org> on 2007/08/24 08:56:34 UTC

[jira] Created: (STR-3088) about blank value of validator required/validwhen

about blank value of validator required/validwhen
-------------------------------------------------

                 Key: STR-3088
                 URL: https://issues.apache.org/struts/browse/STR-3088
             Project: Struts 1
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.3.8
            Reporter: Masakazu Ikezawa


Hello,

As for validator required/requiredif , the continuous space string (ex. "   ") is jugded blank field.

But 'null' of validwhen shows only null or length 0 String .

For ex,'*this* == null' is not hit the continuous space string (ex. "   ").

I think it should be same behavior because 'Validator Guide' described as follows:

>  requiredif  - field dependant validator
>Deprecated, use validwhen.

Now, requiredif cannot be replaced validwhen.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STR-3088) about blank value of validator required/validwhen

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42012 ] 

Paul Benedict commented on STR-3088:
------------------------------------

Henri, want to try fixing this? A series of blanks is not input. If there needed to be a compromise, come up with an "empty" token (ala JSTL) which considers both null and empty strings: *this* == empty. However, I think this is totally unnecessary because validwhen "null" already represents a non-null 0 length string. It seems obvious to me to expand it to multiple spaces.

> about blank value of validator required/validwhen
> -------------------------------------------------
>
>                 Key: STR-3088
>                 URL: https://issues.apache.org/struts/browse/STR-3088
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.8
>            Reporter: Masakazu Ikezawa
>
> Hello,
> As for validator required/requiredif , the continuous space string (ex. "   ") is jugded blank field.
> But 'null' of validwhen shows only null or length 0 String .
> For ex,'*this* == null' is not hit the continuous space string (ex. "   ").
> I think it should be same behavior because 'Validator Guide' described as follows:
> >  requiredif  - field dependant validator
> >Deprecated, use validwhen.
> Now, requiredif cannot be replaced validwhen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (STR-3088) N-length empty strings not treated as *null* by validwhen

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/STR-3088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict resolved STR-3088.
--------------------------------

    Resolution: Fixed

> N-length empty strings not treated as *null* by validwhen
> ---------------------------------------------------------
>
>                 Key: STR-3088
>                 URL: https://issues.apache.org/struts/browse/STR-3088
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.8
>            Reporter: Masakazu Ikezawa
>            Assignee: Paul Benedict
>             Fix For: 1.3.10
>
>
> Hello,
> As for validator required/requiredif , the continuous space string (ex. "   ") is jugded blank field.
> But 'null' of validwhen shows only null or length 0 String .
> For ex,'*this* == null' is not hit the continuous space string (ex. "   ").
> I think it should be same behavior because 'Validator Guide' described as follows:
> >  requiredif  - field dependant validator
> >Deprecated, use validwhen.
> Now, requiredif cannot be replaced validwhen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STR-3088) about blank value of validator required/validwhen

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42011 ] 

Henri Yandell commented on STR-3088:
------------------------------------

So the question is whether validwhen should consider a series of whitespace as blank, or if it was intentional to have it not consider whitespace as blank.

> about blank value of validator required/validwhen
> -------------------------------------------------
>
>                 Key: STR-3088
>                 URL: https://issues.apache.org/struts/browse/STR-3088
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.8
>            Reporter: Masakazu Ikezawa
>
> Hello,
> As for validator required/requiredif , the continuous space string (ex. "   ") is jugded blank field.
> But 'null' of validwhen shows only null or length 0 String .
> For ex,'*this* == null' is not hit the continuous space string (ex. "   ").
> I think it should be same behavior because 'Validator Guide' described as follows:
> >  requiredif  - field dependant validator
> >Deprecated, use validwhen.
> Now, requiredif cannot be replaced validwhen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (STR-3088) N-length empty strings not treated as *null* by validwhen

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/STR-3088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict updated STR-3088:
-------------------------------

    Fix Version/s: 1.3.10
         Assignee: Paul Benedict
          Summary: N-length empty strings not treated as *null* by validwhen  (was: about blank value of validator required/validwhen)

> N-length empty strings not treated as *null* by validwhen
> ---------------------------------------------------------
>
>                 Key: STR-3088
>                 URL: https://issues.apache.org/struts/browse/STR-3088
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.8
>            Reporter: Masakazu Ikezawa
>            Assignee: Paul Benedict
>             Fix For: 1.3.10
>
>
> Hello,
> As for validator required/requiredif , the continuous space string (ex. "   ") is jugded blank field.
> But 'null' of validwhen shows only null or length 0 String .
> For ex,'*this* == null' is not hit the continuous space string (ex. "   ").
> I think it should be same behavior because 'Validator Guide' described as follows:
> >  requiredif  - field dependant validator
> >Deprecated, use validwhen.
> Now, requiredif cannot be replaced validwhen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STR-3088) N-length empty strings not treated as *null* by validwhen

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42017 ] 

Paul Benedict commented on STR-3088:
------------------------------------

Validator "validwhen" now trims the string before comparing to null.

> N-length empty strings not treated as *null* by validwhen
> ---------------------------------------------------------
>
>                 Key: STR-3088
>                 URL: https://issues.apache.org/struts/browse/STR-3088
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.8
>            Reporter: Masakazu Ikezawa
>            Assignee: Paul Benedict
>             Fix For: 1.3.10
>
>
> Hello,
> As for validator required/requiredif , the continuous space string (ex. "   ") is jugded blank field.
> But 'null' of validwhen shows only null or length 0 String .
> For ex,'*this* == null' is not hit the continuous space string (ex. "   ").
> I think it should be same behavior because 'Validator Guide' described as follows:
> >  requiredif  - field dependant validator
> >Deprecated, use validwhen.
> Now, requiredif cannot be replaced validwhen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STR-3088) N-length empty strings not treated as *null* by validwhen

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42177 ] 

Niall Pemberton commented on STR-3088:
--------------------------------------

Fixing this in the 1.3 Branch has also back-ported the fix for STR-2802 - see revision 569606

http://svn.apache.org/viewvc?view=rev&revision=569606

> N-length empty strings not treated as *null* by validwhen
> ---------------------------------------------------------
>
>                 Key: STR-3088
>                 URL: https://issues.apache.org/struts/browse/STR-3088
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.8
>            Reporter: Masakazu Ikezawa
>            Assignee: Paul Benedict
>             Fix For: 1.3.10
>
>
> Hello,
> As for validator required/requiredif , the continuous space string (ex. "   ") is jugded blank field.
> But 'null' of validwhen shows only null or length 0 String .
> For ex,'*this* == null' is not hit the continuous space string (ex. "   ").
> I think it should be same behavior because 'Validator Guide' described as follows:
> >  requiredif  - field dependant validator
> >Deprecated, use validwhen.
> Now, requiredif cannot be replaced validwhen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.