currently lunoxjs has builtin form validation that can be accessed using req.validate() method. But under the hood it using https://github.com/kodepandai/node-input-validator. But sometimes user prefer using third party for validation eg: zod. So IMO, it's better to move this feature to separate module called @lunoxjs/validation.
But may be we got some problem here, since this validation is attached to Request class. So we should use macro to extend this functional. maybe something like this in
// in ValidationServiceProvider
register(){
Request.macro('validate', callback here)
}
currently lunoxjs has builtin form validation that can be accessed using
req.validate()
method. But under the hood it using https://github.com/kodepandai/node-input-validator. But sometimes user prefer using third party for validation eg: zod. So IMO, it's better to move this feature to separate module called@lunoxjs/validation
.But may be we got some problem here, since this validation is attached to
Request
class. So we should use macro to extend this functional. maybe something like this inAlso we need to extend the Request interface using Module Augmentation