Reworked validator to be promise based.