Home / Expert Answers / Computer Science / if-the-validator-fails-attach-the-error-message-on-the-object-pa513

(Solved): If the validator fails, attach the error message on the object. ...



If the validator fails, attach the error message on the
object.

If the validator fails, attach the error message on the object.


We have an Answer from Expert

View Expert Answer

Expert Answer


The answer is ERROR object. The Validator class should be used instead, with the request object and an array of rules being sent in. It is more efficient and easy, but it cannot be used when you wish to add a custom error message to the error object.
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe