failedValidation

    0

    0

    Brett Wraight

    The code will abort the request and return the following error: error: Validation failed.

    public function failedValidation(Validator $validator)
      {
    
          abort(response()->json(['error' => $validator->errors()->first()], 400));
    
      }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.