Skip to main content

Search Results for "custom validation rules"

We found 14 results for "custom validation rules".

Tutorial 14 min read Premium

Laravel Validation: Stock/Price Change with or without Livewire

What if your customer is filling in the order form, and meanwhile the product price has changed? Or, some product becomes out of stock? We need to re-validate the quantities/prices after the submit, right? In this article, I will show you two ways: regular Laravel and more UX-friendly "live validation" with Livewire.

Code Example realodix/urlhub

realodix/urlhub

Files in the example:

  • app/Rules/StrAlphaUnderscore.php
  • app/Http/Requests/StoreUrl.php
  • app/Http/Controllers/UrlController.php

Code Example spatie/spatie.be

spatie/spatie.be

Files in the example:

  • app/Rules/MatchingLicense.php
  • app/Http/Api/Requests/Activations/ShowActivationRequest.php
  • resources/views/components/field.blade.php

Code Example JustinByrne/Mealing

JustinByrne/Mealing

Files in the example:

  • app/Rules/CurrentPasswordRule.php
  • app/Http/Requests/ChangePasswordRequest.php
  • app/Http/Controllers/ProfileController.php

Code Example bytefury/crater

bytefury/crater

Files in the example:

  • app/Rules/Backup/PathToZip.php
  • app/Http/Controllers/V1/Backup/DownloadBackupController.php