Moved form validator to its own file