Now using validator functions for required and type checks.