[richfaces-issues] [JBoss JIRA] (RF-12627) calendar inputSize and datePattern - Validation fails

Jean ANDRE (JIRA) jira-events at lists.jboss.org
Mon Dec 3 14:32:21 EST 2012


    [ https://issues.jboss.org/browse/RF-12627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739041#comment-12739041 ] 

Jean ANDRE commented on RF-12627:
---------------------------------

Is it a suggestion to fix the issue from our side ? -adding to our pattern ? '^dd-MM-YYYY$'
Well, not sure it will be enough...

 - if you type this value "01-01-1976MMM" the validator detects the invalid input :)
 - but with "01-01-19760", means, adding only number, it does not :(.


                
> calendar inputSize and datePattern - Validation fails
> -----------------------------------------------------
>
>                 Key: RF-12627
>                 URL: https://issues.jboss.org/browse/RF-12627
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.2.3.Final
>         Environment: cssparser-0.9.6 - guava-11.0.2 - javax.faces-2.1.14 - Spring 3.0.6.RELEASE - WAS 8 - sac-1.3
>            Reporter: Jean ANDRE
>             Fix For: 5-Tracking
>
>   Original Estimate: 30 minutes
>  Remaining Estimate: 30 minutes
>
> Suppose a rich:calendar as follow, inside a client search screen:
> {code}								<rich:calendar id="search_i-birthday" value="#{controller.birthday}" popup="true" showApplyButton="false" enableManualInput="true" datePattern="dd-MM-yyyy" inputSize="12" styleClass="calendar" oninputkeyup="toggleButtons();" onchange="toggleButtons();" converterMessage="#{msg['search.invalid.date.of.birth'] }" />
> {code}
> In order to allow the user to have enough space for typing the date manually, we fix the input size to 12.
> Unfortunately, when a user type a date like "01-01-19760", the built-in calendar validator does not trigger any error....
> Strictly speaken, the validation of the date should failed because this is not an exact pattern. But in order hand, the string "starts" correctly as "01-01-19760" is 'included' into the format 'dd-MM-YYYY'.
> From our side, it is a bug, because we want a strict validation and because the date is wrong anyway but what is the design goal of RichFaces by allowing a "weak" validation ?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list