Laravel Phone Rust
==================

*v0.2.0*

Phone number validation, formatting and E.164 database columns for Laravel for Rust.

```
cargo add laravel-phone-rust
```

[View on crates.io](https://crates.io/crates/laravel-phone-rust) [View on GitHub](https://github.com/mischasigtermans/laravel-phone-rust)

Validity follows libphonenumber's data. Try a number from your own country in the demo above.

What it does
------------

- Parse in a country

  A number with a + reads as written. A national number reads in each country you name, and the first one it is valid in wins.

- A validation rule

  PhoneRule checks the country, the kind of line and a country field next to the number, with a message ready to show.

- E.164 columns

  A Phone field on a model stores +31612345678 and reads back the same, in JSON too.

- Every format

  E.164, international, national and RFC 3966, plus how to dial the number from another country or from a phone.

[View on crates.io](https://crates.io/crates/laravel-phone-rust).
