Currently if a parameter is defined like { type: string, minLength: 2, maxLength: 2 }, but the parameter is not required, it results in a runtime error. The System.ComponentModel.DataAnnotations.MinLengthAttribute.IsValid(Object value) throws since it is attempting to test the IOptional<string> rather than the string.
Currently if a parameter is defined like { type: string, minLength: 2, maxLength: 2 }, but the parameter is not required, it results in a runtime error. The
System.ComponentModel.DataAnnotations.MinLengthAttribute.IsValid(Object value)throws since it is attempting to test theIOptional<string>rather than thestring.