List of Laravel validation rules

Stefan Izdrail

Founder & Senior Architect · 2026-06-29

Laravel Company
Title: Comprehensive List of Laravel Validation Rules for Request Processing Efficiency Body: Are you looking to enhance your Laravel application's functionality by implementing robust validation rules? Look no further! In this blog post, we will provide a comprehensive list of all available Laravel validation rules and offer best practices to ensure the efficiency of request processing. By following these guidelines, you can create secure and user-friendly applications that stand out from the rest. Laravel is one of the most popular PHP frameworks today. As a result, the documentation provides only basic rules for request validation. While creating custom ones is always an option, having a clear understanding of all available Laravel validation rules can help you make informed decisions and improve the overall user experience. 1. Anatomy of Laravel Validation Rules: A validation rule in Laravel typically consists of two parts - the 'rule' itself and the 'messages'. The former is responsible for determining whether a particular input satisfies the given conditions, while the latter provides custom error messages when these conditions are not met. These rules can be applied both to form requests (using the Request class) and controllers. 2. List of Laravel Validation Rules: Here's a list of all available validation rules in Laravel: - required: The field is mandatory and must be filled out by the user. - required_if, required_with, required_without: A field is necessary on specific conditions. - required_unless, required_unless_in: Useful for input fields that should only be filled in certain scenarios. - in: The input value must be within a predefined set of options (eg. values in an array). - not_in: Similar to 'in', but the user must enter a value other than those specified in the array. - between, min, max: Values should fall within a specific range or meet certain minimum/maximum conditions. - date: Checks if input is formatted according to the system's default time zone. - confirmed: Ensures that the field's values match when required twice (usually for password fields). - email: Verifies that the user input can be recognized as a valid email address. - url, uri, ipv4, ipv6: Validates user input as per specified URL, URI, IPv4 or IPv6 formats. - integer, decimal, boolean, size, exists, regex, json: Checks if the field value meets specific data type requirements. For a more extensive list and detailed explanations on using these rules, refer to the Laravel documentation at https://laravelcompany.com/docs/8.x/validation#validating-requests. 3. Best Practices for Efficient Request Processing: To ensure that your Laravel application runs smoothly and efficiently, here are some best practices to keep in mind: - Avoid using too many custom validation rules as they might be replaced during Laravel updates, making your code obsolete. Instead, choose from the available built-in rules whenever possible. - Utilize error messages for a better user experience, ensuring that users understand why their input was rejected and how to correct it. Keep these messages concise yet informative. - Use validation groups for different scenarios, making your code more modular and easier to maintain. For instance, you can define specific validation rules for registration, login, or update user profiles. - When working with complex forms or nested data structures, use nested arrays within form requests to validate these structures effectively. This will help avoid multiple request validations and reduce processing time. 4. Conclusion: By referring to this comprehensive list of Laravel validation rules and incorporating best practices for efficient request processing, you can enhance your application's functionality while ensuring data integrity and user satisfaction. For more detailed information on using these rules in your Laravel projects, visit https://laravelcompany.com/blog/laravel-validation-rules-explained/.