validator icon indicating copy to clipboard operation
validator copied to clipboard

Is it possible to register custom validation function directly returning errors?

Open seongjae-min opened this issue 1 year ago • 1 comments

  • [x] I have looked at the documentation here first?
  • [x] I have looked at the examples provided that may showcase my question here?

Package version eg. v9, v10:

v10

Issue, Question or Enhancement:

Hello folks,

I'd like to validate requests in HTTP server. I want to tell clients why you failed the request.

In some cases, there are several conditions to validate. However, current RegisterValidation method for *Validate accept function returning bool value, It means that it cannot represent why validation failed, only tell whether it succeeds or not.

So,

Q. Is there any way to return errors directly?

seongjae-min avatar Jun 12 '24 09:06 seongjae-min

need this fr. turns out it isnt going to be implemented till v11 #669

noornee avatar Jun 15 '24 07:06 noornee