:art: Move validation part to a separate function
:art: Move validation part to a separate function

UltCombo/linter,DanPurdy/linter,atom-community/linter,JohnMurga/linter,e-jigsaw/Linter,kaeluka/linter,levity/linter,AtomLinter/Linter,shawninder/linter,josa42/Linter,iam4x/linter,mdgriffith/linter,blakeembrey/linter,elkeis/linter,steelbrain/linter,simurai/linter-plus,AsaAyers/linter,Arcanemagus/linter