if defaultValue is provided, required should be set to false