added custom method for checking `required` rule