Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Validator Es Laravel Package

ajgl/validator-es

View on GitHub
Deep Wiki
Context7

AjglValidatorEs

This library provides some validators for common Spanish codes.

Build Status Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Current supported codes to validate are:

  • DNI
  • NIE
  • IdCard (DNI or NIE)
  • CCC
  • IBAN (Limited to Spanish accounts)

Installation

composer require ajgl/validator-es

Usage

All validators implements a common interface with only one method:

<?php
namespace Ajgl\ValidatorEs;

interface ValidatorInterface
{
    public function isValid(mixed $value): bool;
}

To use any validator, you must instantiate it, and call the isValid method:

<?php
require 'vendor/autoload.php';

$value = 'Y0000000Z';
$validator = new \Ajgl\ValidatorEs\IdCardValidator();
assert($validator->isValid($value));

License

This library is released under an open source license. See the complete license in the LICENSE file.

Reporting an issue or a feature request

Read the CONTRIBUTING.md file.

Author Information

Developed with ♥ by Antonio J. García Lagar.

If you find this library useful, please add a ★ in the GitHub repository page.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin