Use $schema from validate function