fix typo
refactor bean validation logic in an external class