Welcome Guest, Not a member yet? Register   Sign In
Cart library: how to extend library class regex validation without messing with the core?
#1

[eluser]moonbeetle[/eluser]
Cart.php, line 31
Code:
var $product_name_rules    = '\.\:\-_ a-z0-9'; // alpha-numeric, dashes, underscores, colons or periods

While the pattern above will be valid in 99% of the cases I need to add a few allowed characters like a ? and a !
(building a shopping cart for book titles where some have a question or exclamation mark at the end)

Of course I can add those extra characters to the array. But this would mean that when I upgrade to a newer version of CI, I must keep track of such changes. Is there a better way in this case?


Messages In This Thread
Cart library: how to extend library class regex validation without messing with the core? - by El Forum - 10-12-2009, 12:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB