Moved responsiblity of validating input value from isValid() to validate(). validate() is now responsible only for checking error_name presence. This will prevent repeated checks.