You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2011/02/13 20:52:57 UTC

[jira] Commented: (OFBIZ-4171) Blank year in UtilValidate.isYear should return false

    [ https://issues.apache.org/jira/browse/OFBIZ-4171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994144#comment-12994144 ] 

Jacques Le Roux commented on OFBIZ-4171:
----------------------------------------

On David's advice on dev ML, reverted at r1070282  for the trunk, r1070284  for R10.04



> Blank year in UtilValidate.isYear should return false
> -----------------------------------------------------
>
>                 Key: OFBIZ-4171
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4171
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 10.04, SVN trunk
>         Environment: Win XP
>            Reporter: Stephen Rufle
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Release Branch 10.04, SVN trunk
>
>         Attachments: OFBIZ-4171.patch
>
>
> UtilValidate.isYear returns true for a blank year which the calling function UtilValidate.isDate(String, String, String) tries to parse. This causes an exception to be thrown
> ValidateMethod.java:96 :ERROR] [ValidateMethod.exec] Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null
> I found this error when trying to add a new credit card in the eCommerce checkout flow.
> # Add a product to the cart
> # login as any user I used "admin"
> # Checkout Step "Shipping Address" (Step 1: Where shall we ship it?)
> #* Click Next 
> # Checkout Step "Shipping Options" (Step 2: How shall we ship it?)
> #* Choose "UPS Air"
> #* Click Next 
> # Checkout Step "Payment Options" (Step 3: How shall you pay?)
> # Create "Credit Card"
> #* Fill Name
> #* Card Type "Visa"
> #* Card Number "4111111111111111"
> #* Expiration Date Month drop-down 01
> #* Expiration Date Year drop-down leave blank
> #* Choose billing address
> #* Click "Save" button
> Should see "Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null" 
> My fix is to change isYear, isMonth, and isDay to return false when a blank value is entered.
> After I make my change the message is "The expiration date is before today"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira