ui-awesome / form-model
UIAwesome Form Model for PHP.
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-11-18 23:27:23 UTC
README
UIAwesome Form Model for PHP.
Is a library that provides a flexible and easy way to create and validate fields for web forms, models, and other data structures.
<?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.', ]; } }
Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist ui-awesome/form-model:"^0.1"
or add
"ui-awesome/form-model": "^0.1"
Usage
Check the documentation docs to learn about usage.
Testing
Check the documentation testing to learn about testing.
Support versions
License
The MIT License (MIT). Please see License File for more information.