All this validation can probably be done w/ the node-validator module