adds client side validation to color form