Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

README.md

LVRules

Latest Version on Packagist Software License Total Downloads

This is a set of useful extra validation methods for the Laravel framework.

Contents

Note

Rules included in this package written by me (or other contributers) where not a part of Laravel validation rules at the time they where written. They are a collection of rules that where needed by me or others at that time, please see Laravel docs first before using any of rules in this package.

Installation

Via Composer

$ composer require moharrum/lvrules

Edit config/app.php and add the provider (only for Laravel 5.4 or below):

    'providers' => [
        Moharrum\LVRules\LVRulesServiceProvider::class,
    ]

Rules

  • alpha_num_space - Determine whether or not the given string consists of a combination of letters, numbers, spaces.
  • alpha_space - Determine whether or not the given string consists of a combination of letters and spaces.
  • alpha_dash - Determine whether or not the given string consists of a combination of letters and dashes.
  • decimals - Determine whether or not the given number has (n) decimal point places or not.
  • even - Validates if the given value is even number.
  • fails - Obviously, validation will always return false.
  • finite - Validates if the given is legal finite number.
  • infinite - Validates if the given value is infinite.
  • lowercase - Validates if the given string is in lowercase format.
  • max_words - Validates if the given string contains more than (n) number of words.
  • min_words - Validates if the given string contains at least (n) number of words.
  • odd - Validates if the given value is odd.
  • passes - Obviously, validation will always return true.
  • slug - Validates if the given string is url slug.
  • time - Validates if the given string is a time format.
  • tld - Validates if the given string is a top level domain.
  • unique_with - Validates multi columns and values uniqueness.
  • uppercase - Validates if the given string is in uppercase format.
  • username - Validates if the given string is a username.

Languages

Publishing the language files:

php artisan vendor:publish

Published files can be found at /resources/lang/vendor/lvrules.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email khalid.moharram@gmail.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.