I created a custom attribute with the input type for products in the back-end, and add new class for it. It called "validate-custom-attribute". I also add this javascript codes but when I save product, it is still passed. How can I validate it? Validation.add("validate-custom-attribute", "Input not correct", function(v) { parten=/^(\d.{0,1},{0,1})+$/; return (parten.test($("gift_dropdown").value)); });