ui-awesome / form-model
PHP的UIAwesome表单模型。
0.1.0
2024-03-18 21:46 UTC
Requires
- php: ^8.1
- ext-mbstring: *
- php-forge/helpers: ^0.1
- ui-awesome/html-interop: ^0.1
- ui-awesome/model: ^0.1
Requires (Dev)
- maglnet/composer-require-checker: ^4.7
- php-forge/support: ^0.1
- phpunit/phpunit: ^10.5
- roave/infection-static-analysis-plugin: ^1.34
- symplify/easy-coding-standard: ^12.0
- vimeo/psalm: ^5.2
This package is auto-updated.
Last update: 2024-09-18 23:07:22 UTC
README
PHP的UIAwesome表单模型。
这是一个库,提供了一种灵活且简单的方式来创建和验证网页表单、模型和其他数据结构的字段。
<?php declare(strict_types=1); namespace App\FormModel; use UIAwesome\FormModel\AbstractFormModel; final class User extends AbstractFormModel { private string $username = ''; public function getHints(): array { return [ 'username' => 'The hint for the field.', ]; } public function getLabels(): array { return [ 'username' => 'The label for the field.', ]; } public function getPlaceholders(): array { return [ 'username' => 'The placeholder for the field.', ]; } }
安装
安装此扩展的首选方式是通过composer。
运行以下命令之一:
composer require --prefer-dist ui-awesome/form-model:"^0.1"
或添加
"ui-awesome/form-model": "^0.1"
使用方法
查看文档以了解使用方法。
测试
查看测试文档以了解测试。
支持版本
许可协议
MIT许可协议(MIT)。有关更多信息,请参阅许可文件。