Closed sinclairzx81 closed 7 months ago
This PR adds specialized string length constraints for the RegExp type. These constraints were missed on 0.32.0.
Prior to this revision, users would need to intersect a RegExp with a String containing the string length constraints.
const T = Type.Intersect([ Type.String({ minLength: 3, maxLength: 10 }), Type.RegExp(/(.*)/) ])
This PR adds them directly to RegExp
const T = Type.RegExp(/(.*)/, { minLength: 3, maxLength: 10 })
RegExp range constraint errors will generate String range errors on validation failure.
This PR adds specialized string length constraints for the RegExp type. These constraints were missed on 0.32.0.
Prior to this revision, users would need to intersect a RegExp with a String containing the string length constraints.
This PR adds them directly to RegExp
RegExp range constraint errors will generate String range errors on validation failure.