mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 21:34:03 +00:00
11 lines
No EOL
569 B
Markdown
11 lines
No EOL
569 B
Markdown
---
|
|
title: 'You can validate a field and exclude it from the validated() data'
|
|
tweet_id: '1520040281818550274'
|
|
thread_slug: weekly-thread-2022-17
|
|
author_username: mattkingshott
|
|
images:
|
|
- 'https://pbs.twimg.com/media/FRLzG4QXEAAOfyA.jpg'
|
|
created_at: 2022-04-29T14:00:18+00:00
|
|
slug: you-can-validate-a-field-and-exclude-it-from-the-validated-data
|
|
---
|
|
🔥 #Laravel Tip: When you need to validate a field, but don't actually require it for anything e.g. 'accept terms and conditions', make use of the 'exclude' rule. That way, the 'validated' method won't return it... |