Refactoring of user comment form validation