fix validator middleware should not accept default values as valid when the values are required in the schema