added methods to Error and CardValidate