You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Lance Frohman (JIRA)" <de...@myfaces.apache.org> on 2006/03/08 02:50:39 UTC

[jira] Created: (TOMAHAWK-182) new validator - validate comma separated entries by splitting them and validating individually

new validator - validate comma separated entries by splitting them and validating individually
----------------------------------------------------------------------------------------------

         Key: TOMAHAWK-182
         URL: http://issues.apache.org/jira/browse/TOMAHAWK-182
     Project: MyFaces Tomahawk
        Type: New Feature
  Components: Validators  
    Versions: 1.1.2-SNAPSHOT    
    Reporter: Lance Frohman
    Priority: Minor
     Fix For: 1.1.2-SNAPSHOT


I created a new validator, I needed to validate comma separated email addresses
entered in a single text box, but I generalized it. This validator will validate the entry (must be a String)
by first separating by a separator (parameter - defaults to ","), and then validating
each separated sub string using the subvalidator (parameter). The error messages
(if any) are accumulated into one. The only problem is that you can not pass parameters to the
sub validator, so it will only work on subvalidators with no parameters or with defaults for all parameters.

parameters:
separator - regular expression to use for separating the input String (default is comma)
subvalidatorId - the id of the validator to be used on each substring

example (to validate semicolon separated credit card numbers):
   <h:inputText id="credit_cards" value="#{testHandler.creditCards}">
      <t:csvalid subvalidatorId="org.apache.myfaces.validator.CreditCard" separator=";"/>
   </h:inputText>



PLEASE email me at lfrohman@gmail.com if there is a problem, or if you have any questions. 
Thank you.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (TOMAHAWK-182) new validator - validate comma separated entries by splitting them and validating individually

Posted by "Lance Frohman (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-182?page=all ]

Lance Frohman updated TOMAHAWK-182:
-----------------------------------


> new validator - validate comma separated entries by splitting them and validating individually
> ----------------------------------------------------------------------------------------------
>
>          Key: TOMAHAWK-182
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-182
>      Project: MyFaces Tomahawk
>         Type: New Feature
>   Components: Validators
>     Versions: 1.1.2-SNAPSHOT
>     Reporter: Lance Frohman
>     Priority: Minor
>      Fix For: 1.1.2-SNAPSHOT
>  Attachments: CSVValidator.java, CSVValidatorTag.java, faces-config.xml, messages.properties, taglib.tld
>
> I created a new validator, I needed to validate comma separated email addresses
> entered in a single text box, but I generalized it. This validator will validate the entry (must be a String)
> by first separating by a separator (parameter - defaults to ","), and then validating
> each separated sub string using the subvalidator (parameter). The error messages
> (if any) are accumulated into one. The only problem is that you can not pass parameters to the
> sub validator, so it will only work on subvalidators with no parameters or with defaults for all parameters.
> parameters:
> separator - regular expression to use for separating the input String (default is comma)
> subvalidatorId - the id of the validator to be used on each substring
> example (to validate semicolon separated credit card numbers):
>    <h:inputText id="credit_cards" value="#{testHandler.creditCards}">
>       <t:csvalid subvalidatorId="org.apache.myfaces.validator.CreditCard" separator=";"/>
>    </h:inputText>
> PLEASE email me at lfrohman@gmail.com if there is a problem, or if you have any questions. 
> Thank you.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (TOMAHAWK-182) new validator - validate comma separated entries by splitting them and validating individually

Posted by "Lance Frohman (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-182?page=all ]

Lance Frohman resolved TOMAHAWK-182.
------------------------------------

    Fix Version/s: 1.1.5-SNAPSHOT
       Resolution: Fixed

patches applied revision 434193

> new validator - validate comma separated entries by splitting them and validating individually
> ----------------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-182
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-182
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>          Components: Validators
>    Affects Versions: 1.1.2-SNAPSHOT
>            Reporter: Lance Frohman
>         Assigned To: Lance Frohman
>            Priority: Minor
>             Fix For: 1.1.5-SNAPSHOT
>
>         Attachments: CSVValidator.java, CSVValidatorTag.java, faces-config.xml, messages.properties, taglib.tld
>
>
> I created a new validator, I needed to validate comma separated email addresses
> entered in a single text box, but I generalized it. This validator will validate the entry (must be a String)
> by first separating by a separator (parameter - defaults to ","), and then validating
> each separated sub string using the subvalidator (parameter). The error messages
> (if any) are accumulated into one. The only problem is that you can not pass parameters to the
> sub validator, so it will only work on subvalidators with no parameters or with defaults for all parameters.
> parameters:
> separator - regular expression to use for separating the input String (default is comma)
> subvalidatorId - the id of the validator to be used on each substring
> example (to validate semicolon separated credit card numbers):
>    <h:inputText id="credit_cards" value="#{testHandler.creditCards}">
>       <t:csvalid subvalidatorId="org.apache.myfaces.validator.CreditCard" separator=";"/>
>    </h:inputText>
> PLEASE email me at lfrohman@gmail.com if there is a problem, or if you have any questions. 
> Thank you.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (TOMAHAWK-182) new validator - validate comma separated entries by splitting them and validating individually

Posted by "Lance Frohman (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-182?page=all ]

Lance Frohman updated TOMAHAWK-182:
-----------------------------------


> new validator - validate comma separated entries by splitting them and validating individually
> ----------------------------------------------------------------------------------------------
>
>          Key: TOMAHAWK-182
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-182
>      Project: MyFaces Tomahawk
>         Type: New Feature
>   Components: Validators
>     Versions: 1.1.2-SNAPSHOT
>     Reporter: Lance Frohman
>     Priority: Minor
>      Fix For: 1.1.2-SNAPSHOT
>  Attachments: CSVValidator.java, CSVValidatorTag.java, faces-config.xml, messages.properties, taglib.tld
>
> I created a new validator, I needed to validate comma separated email addresses
> entered in a single text box, but I generalized it. This validator will validate the entry (must be a String)
> by first separating by a separator (parameter - defaults to ","), and then validating
> each separated sub string using the subvalidator (parameter). The error messages
> (if any) are accumulated into one. The only problem is that you can not pass parameters to the
> sub validator, so it will only work on subvalidators with no parameters or with defaults for all parameters.
> parameters:
> separator - regular expression to use for separating the input String (default is comma)
> subvalidatorId - the id of the validator to be used on each substring
> example (to validate semicolon separated credit card numbers):
>    <h:inputText id="credit_cards" value="#{testHandler.creditCards}">
>       <t:csvalid subvalidatorId="org.apache.myfaces.validator.CreditCard" separator=";"/>
>    </h:inputText>
> PLEASE email me at lfrohman@gmail.com if there is a problem, or if you have any questions. 
> Thank you.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira