softlogic-gt/laravel-validation-rules-gt

A set of useful Laravel validation rules for Guatemala (GT)

Installs: 112

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/softlogic-gt/laravel-validation-rules-gt

v1.0.1 2024-12-10 19:49 UTC

This package is auto-updated.

Last update: 2025-10-10 21:44:08 UTC


README

This repository contains useful Laravel validation rules for Guatemalan documents:

Installation

You can install the package via composer:

composer require softlogic-gt/laravel-validation-rules-gt

The package will automatically register itself.

Translations

If you wish to edit the package translations, you can run the following command to publish them into your resources/lang folder

php artisan vendor:publish --provider="SoftlogicGT\ValidationRulesGT\ValidationRulesGTServiceProvider"

Available rules

DPI

Determine if the field under validation is a valid Guatemalan DPI.

use SoftlogicGT\ValidationRulesGT\Rules\Dpi;

public function rules()
{
    $rules = [
        'dpi' => ['required', new Dpi()],
    ];
    $request->validate($rules)
}

NIT

Determine if the field under validation is a valid Guatemalan Tax ID (NIT).

use SoftlogicGT\ValidationRulesGT\Rules\Nit;

public function rules()
{
    $rules = [
        'nit' => ['required', new Nit()],
    ];
    $request->validate($rules)
}