vesperabr/fieldtize 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vesperabr/fieldtize

最新稳定版本:0.1.0

Composer 安装命令:

composer require vesperabr/fieldtize

包简介

Parse, validate and format fields easily.

README 文档

README

Parse, validate and format common fields in an easy way.

Installation

You can install the package via composer:

$ composer require vesperabr/fieldtize

Methods

Every field class has at least this methods:

  • make() Returns the field class instance.
  • original() Returns the original value passed to the class.
  • get() Returns the formatted value or null if value is invalid.
  • raw() Returns the value without any masks or null if value is invalid.
  • isValid() Returns true or false if value is invalid.

Fields

Phone

use Vespera\Fieldtize\Fields\Phone;

$phone = Phone::make('1144443333');
$phone->original(); // '1144443333'
$phone->get();      // '(11) 4444-3333'
$phone->raw();      // '+551144443333'
$phone->isValid();  // true
echo $phone;        // '(11) 4444-3333'

Todo

  • Phone field: getUri() method
  • Phone field: getWhatsappUri() method
  • Phone field: getInternationalNumber() method
  • Phone field: getType() method
  • Phone field: getCountry() method
  • CPF field
  • CNPJ field
  • CPF/CNPJ field
  • CEP field
  • E-mail field

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固