PHP

Validation in Laravel

Në shqip: Validimi në Laravel

ShpjegimiSQ

Laravel-i e bën validimin shumë të lehtë: $request->validate(["email" => "required|email"]). Po dështoi, e kthen vetë përdoruesin te formulari me mesazhet e gabimit.

EnglishEN

Laravel makes validation very easy: $request->validate(["email" => "required|email"]). If it fails, it sends the user back to the form with the error messages automatically.

Si ta mendosh

Si sekretaria që ta kthen formularin me shënime ku ke gabuar.

Lexoje në anglisht

Like a secretary handing your form back with notes on what's wrong.

Shembull kodiphp

<?php
$te_dhenat = $request->validate([
  "emri" => "required|max:50",
  "email" => "required|email|unique:perdoruesit",
]);

Terma të lidhur