docs($compile): fix a typo

Closes #5639
refactor(input): wrapped validation logic in helper function

Closes #5643