2017 © Pedro PelĂĄez
 

library simple-vat

Simple package to check European's VAT number format

image

hantless/simple-vat

Simple package to check European's VAT number format

  • Thursday, December 28, 2017
  • by hantless
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Laravel Simple VAT

Laravel Simple VAT is a small library to check format of European VAT number., (*1)

It's mainly a curated version of the Laravel VAT package, removing the SOAP call for existence., (*2)

Installation

Simply require the project using Composer:, (*3)

$ composer require hantless/simple-vat

Once Simple VAT is installed, you need to register the service provider. Open up config/app.php and add the following to the providers key., (*4)

  • Hantless\SimpleVat\SimplevatServiceProvider::class

Or if you're using Laravel 5.5+, it should auto discover the package., (*5)

Usage

Use the validation rule "vat_format" in your formRequest:, (*6)


/** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'vatnumberfield' => 'vat_format', ]; }

or in your validator:, (*7)


public function store(Request $request) { $validator = Validator::make($request->all(), [ 'vatnumberfield' => 'vat_format', ]); if ($validator->fails()) { // redirect ... display error } // store entity... }

Add the error message in your translation files (resources/lang/{lang}/validation.php), (*8)


'vat_format' => 'The :attribute do not seem to be a valid VAT number',

License

Laravel Simple VAT is licensed under The MIT License(MIT)., (*9)

The Versions

28/12 2017

dev-master

9999999-dev

Simple package to check European's VAT number format

  Sources   Download

MIT

The Requires

 

The Development Requires

by Frédéric Arijs

laravel check format vat

28/12 2017

0.0.3

0.0.3.0

Simple package to check European's VAT number format

  Sources   Download

MIT

The Requires

 

The Development Requires

by Frédéric Arijs

laravel check format vat

15/12 2017

0.0.2

0.0.2.0

Simple package to check European's VAT number format

  Sources   Download

MIT

The Requires

 

The Development Requires

by Frédéric Arijs

laravel check format vat

14/12 2017

0.0.1

0.0.1.0

Simple package to check European's VAT number format

  Sources   Download

MIT

The Requires

 

The Development Requires

by Frédéric Arijs

laravel check format vat