Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Order
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2015 at 14:38 UTC
Updated:
4 Apr 2016 at 01:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
akosipax commentedHere's a patch.
Comment #4
rszrama commentedCan we not do this via an element validate handler w/ form_set_value()?
Comment #5
akosipax commentedIs this preferable?
Comment #7
akosipax commentedOops. I didn't pass an array to #element_validate.
Comment #9
akosipax commentedA, sorry. Trying this again.
Comment #10
mrpeanut commentedPatch from #9 applies cleanly and works on my site. Thanks!
Comment #11
joelpittetGood call on trimming this, no need to have bad data from simple mistakes.
Comment #12
rszrama commentedHonestly, even for "private" functions prefixed w/ an underscore, we should include the module name in the prefix. The validate handler should be renamed
_commerce_order_validate_order_mail(), and there's no reason to make$trimmed_emaila separate variable really.Comment #13
joelpittetAddressing feedback from #12
Comment #14
rszrama commentedAwesome, thanks! I was thinking about it and actually went ahead and dropped the underscore prefix on the off chance other modules create interfaces for order e-mail addresses to be entered and want to reuse the validate handler.