---
title: "Discussion on \"Laravel Validation: Validating Input as Equal to a specific value or PHP Variable\" | Hashnode"
description: "Discussion on \"Laravel Validation: Validating Input as Equal to a specific value or PHP Variable\". TL; DR;\nAs of version 10, Laravel does not have a built-in way to validate that a field is equal to a specific value. However, you can easily create a custom rule to accomplish this.\nCreate scaffolding for the rule with artisan:\nphp artisan make:rule..."
url: "https://hashnode.com/posts/laravel-validation-validating-input-as-equal-to-a-specific-value-or-php-variable/65325e597ad7af973e10647d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Laravel Validation: Validating Input as Equal to a specific value or PHP Variable](https://annissimo.com/laravel-validation-validating-input-as-equal-to-a-specific-value-or-php-variable?utm_source=hashnode&utm_medium=feed)

TL; DR; As of version 10, Laravel does not have a built-in way to validate that a field is equal to a specific value. However, you can easily create a custom rule to accomplish this. Create scaffolding for the rule with artisan: php artisan make:rule...

Oct 20, 2023 · 4 min read · annissimo.com  
Read the article

-   [#validation](https://hashnode.com/tag/validation)
-   [#laravel](https://hashnode.com/tag/laravel)
-   [#php](https://hashnode.com/tag/php)

## Written by

[Amadeusz Annissimo](https://hashnode.com/@amade)

@amade · Tallinn, Estonia

  
[View profile](https://hashnode.com/@amade)

Technical Co-Founder

## Responses 1

Markdown supported · ⌘↵ to post

No responses yet.
