Laravel Validation: 12 Less-Known Tips in 13 Minutes

Laravel Validation: 12 Less-Known Tips in 13 Minutes

Laravel Daily

3 года назад

37,957 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

DigitalEagleDev
DigitalEagleDev - 21.02.2023 06:39

Excellent, Thanks a lot for your time and efforts

Ответить
Miquel Àngel dv
Miquel Àngel dv - 20.11.2022 15:30

Hi to everyone! There is a way to validate a two fields unique combination? I'm in a project which need to validate a combination of slug and category (The user can choose the slug in the form) in order to avoid duplicated urls. Thanks in advance

Ответить
Programming Geeks Eth
Programming Geeks Eth - 08.11.2022 14:16

Thank you so much ,
you are so amaizing

Ответить
Al Nahian
Al Nahian - 19.08.2022 21:25

TBH, from this superb helpful video I learned a lot! Specially I never knew something like Fake Filler extension ever existed. It's really saving my time and improving my productivity.

Thanks Dear Povilas 🧡

Ответить
M Ibrahim
M Ibrahim - 24.07.2022 01:02

Hi ..
this is the best channel I've ever seen ..
do you have any courses on the internet ? ..
THANKS

Ответить
Blok Kaliwon
Blok Kaliwon - 15.06.2022 10:09

Sir, how to make unique validation of 2 or 3 fields in controller. ?
So when inputting the same data on 2 or 3 fields a notification will appear that the inputted data already exists.

Ответить
Serdar Myradov
Serdar Myradov - 27.05.2022 05:55

thank you...

Ответить
Margo P
Margo P - 09.12.2021 15:44

Try to use laravel validate and catch error in case file is bigger than upload_max_size or post_max_size!

Ответить
Víctor González Toledo
Víctor González Toledo - 08.10.2021 12:11

Thanks as always!

Ответить
shubhajeet naik
shubhajeet naik - 13.08.2021 18:41

Hello Sir,
I want to Validate One User Name... It may Either Email or Phone... I have two Regex... How to put OR condition in Laravel Validation...
Thanks in Advance.

Ответить
Hosam Alzagh حسام الزاغ
Hosam Alzagh حسام الزاغ - 30.07.2021 17:45

how to custom massage validate with multi required_if 'notes' => ['required_if:status,2,0' , 'max:70' ],

Ответить
surflaweb
surflaweb - 13.07.2021 04:04

Great.. I didnt know "present" rule.. Amazing

Ответить
Mindaugas Virbickis
Mindaugas Virbickis - 11.04.2021 16:11

Hi. Offtopic. How to return response json from Request Form ?

Ответить
darknmy
darknmy - 28.03.2021 12:54

can you just write __('Name is required') ?

Ответить
Bumble Bity
Bumble Bity - 15.03.2021 13:15

I have issue with sometimes rule. I don't present any value to password and I get validation error rule, although it should trigger if I present some value.

Ответить
Luis Fellipe M. O. Balestrero
Luis Fellipe M. O. Balestrero - 14.03.2021 16:22

Validated function is available in Validator::make!!!!

Ответить
Random Guy
Random Guy - 11.03.2021 21:04

Sir, please reply.
One of my senior told me to use validations inside MODELS, but in Laravel, I generally use FORM-REQUESTS to validate data (I use the same form request for API and WEB requests), he a developer in some other language and told me that, if you will use validations in MODELS, you will not need to write separately validate request in API, SEEDERS, CONTROLLERS etc, you can use the model validation just from one place, check the validation at boot function while self::creating.

So that anyone who tries to create any data using that model, validation must pass.
What you think about this approach.

Ответить
Rizki Hutama
Rizki Hutama - 07.03.2021 17:40

can i use $request->validated() without form request? i use $request->validate() can i do with this method?

Ответить
Gumaro Melendez
Gumaro Melendez - 06.03.2021 06:00

Poop-ton of useful information in this video. Thanks for all the great content, really appreciate it

Ответить