soved/laravel-phone-number-validation

v1.3.1 2020-09-11 06:54 UTC

This package is auto-updated.

Last update: 2024-09-11 15:24:02 UTC


README

Scrutinizer Code Quality Latest Stable Version Monthly Downloads License

使用Laravel强大的验证功能。

要求

  • PHP >= 7.1
  • Laravel >= 5.5或6.0

安装

通过Composer包管理器安装此包

$ composer require soved/laravel-phone-number-validation

使用

您可以将电话号码验证作为任何其他验证规则使用

<?php

$request->validate([
    'phone_number' => 'required|string|phone_number',
]);

如果需要,您可以通过向验证语言文件中添加条目来自定义验证错误消息

'phone_number' => 'The phone number format is invalid.',

'accepted' => 'The :attribute must be accepted.',

// The rest of the validation error messages...

安全漏洞

如果您在此项目中发现安全漏洞,请通过sander@tutanota.de向Sander de Vos发送电子邮件。所有安全漏洞都将得到及时解决。

许可证

此包是开源软件,许可协议为MIT许可协议