Validate moved to functions