Adding error color

If we set the property error to YES, the text color of the text field will change to the defined error color. Otherwise, it will be defined as the validColor.