PHP Classes

PHP Turkiye Regex: Validate values of people with regular expressions

Recommend this page to a friend!
  Info   View files Documentation   View files View files (17)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 16 All time: 11,211 This week: 107Up
Version License PHP version Categories
php-turkiye-regex 1.0Custom (specified...5PHP 5, Validation
Description 

Author

This package is specific mainly for applications used in Turkey Turkey .

This class can validate the values of people with regular expressions.

It can take strings with several types of values that people from Turkey can use to identify them or something they own.

Currently, it can validate phone numbers, identity numbers, credit card numbers, car plates, and dates.

Picture of Isa Eken
  Performance   Level  
Name: Isa Eken <contact>
Classes: 20 packages by
Country: Turkey Turkey
Age: 21
All time rank: 276744 in Turkey Turkey
Week rank: 312 Up6 in Turkey Turkey Up
Innovation award
Innovation award
Nominee: 13x

Documentation

PHP için Türkiye Regex Kütüphanesi

Türkiye formatlar?na uygun Regex kütüphanesi.

use IsaEken\TurkiyeRegex\TurkiyeRegex;

TurkiyeRegex::CellPhone("05231231212");
TurkiyeRegex::Phone("01231231212");
TurkiyeRegex::TaxNumber("1234567890");

Kurulum

Paketi composer kullanarak kurabilirsiniz.

composer require isaeken/php-turkiye-regex

Kullan?m

`interface IsaEken\TurkiyeRegex\Interfaces\Validator\Interface`

`validate(string|array $validate): bool`

Girilen string veya string[] de?erlerini kulland???n?z s?n?fta do?rulamas?n? yapar.

Fonksiyonlar

use IsaEken\TurkiyeRegex\TurkiyeRegex;

TurkiyeRegex::CellPhone(["05231231212", "05231231212"]); // true
TurkiyeRegex::Phone("01231231212"); // true
TurkiyeRegex::Identity("1234567890"); // false
TurkiyeRegex::TaxNumber("1234567890"); // true
TurkiyeRegex::CreditCard("1111222233334444"); // true
TurkiyeRegex::CarPlate("34A2344"); // true
TurkiyeRegex::Date("10.04.2002"); // true

// alias
TurkiyeRegex::CellPhoneNumber("05231231212"); // true
TurkiyeRegex::PhoneNumber("01231231212"); // true
TurkiyeRegex::IdentityNumber("1234567890"); // false
TurkiyeRegex::Tax("1234567890"); // true
TurkiyeRegex::CreditCardNumber("1111222233334444"); // true
TurkiyeRegex::Plate("34A2344"); // true
TurkiyeRegex::BirthDate("10.04.2002"); // true

Testing

composer test

License

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


  Files folder image Files  
File Role Description
Files folder imagesrc (1 file, 2 directories)
Files folder imagetests (2 files)
Plain text file composer.json Data Auxiliary data
Plain text file LICENSE.md Lic. License text
Plain text file phpunit.xml.dist Data Auxiliary data
Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageInterfaces (1 file)
Files folder imageValidators (9 files)
  Plain text file TurkiyeRegex.php Class Class source

  Files folder image Files  /  src  /  Interfaces  
File Role Description
  Plain text file ValidatorInterface.php Class Class source

  Files folder image Files  /  src  /  Validators  
File Role Description
  Plain text file CarPlate.php Class Class source
  Plain text file CellPhone.php Class Class source
  Plain text file CreditCard.php Class Class source
  Plain text file Date.php Class Class source
  Plain text file Identity.php Class Class source
  Plain text file Phone.php Class Class source
  Plain text file TaxNumber.php Class Class source
  Plain text file TcKimlikNo.php Class Class source
  Plain text file Validator.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file FactoryTest.php Class Class source
  Plain text file ValidatorTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:16
This week:0
All time:11,211
This week:107Up