Glossary

Validation

Checking that incoming data is complete and correct before using it.

In plain words

Validation means checking what users or other programs send you before you trust it: is the email really an email, is the age a number, is the required field filled in?

Why it matters

Never trust input. Some mistakes are honest (a typo), some are deliberate attacks. Validation stops both at the door. In Laravel:

$data = $request->validate([
    'email' => ['required', 'email'],
]);

If the check fails, Laravel stops and replies with a clear error, so your code never sees bad data.

See Build a REST API.

Found this useful?

Every lesson stays free. Tap the thumbs up so we know what works, or say thanks with a soda or a coffee: it pays for hosting and new lessons.

Buy me a sodaBuy me a coffee

Want more on this?

Tell us which part was not clear, ask for a follow-up lesson, or request a lesson on any topic. We read every request.

I would like
Only to tell you when it is ready.

WhatsApp

Join the channelChat with us

Free lessons and updates in the channel. Questions about learning or training? Chat with us.