trsteel/html-form-validation-bundle

轻松禁用HTML5验证错误。

1.1.4 2024-02-01 01:59 UTC

This package is auto-updated.

Last update: 2024-09-20 00:00:50 UTC


README

轻松禁用HTML5验证错误。

将以下行添加到deps文件中

[TrsteelHtmlFormValidationBundle]
    git=http://github.com/trsteel88/TrsteelHtmlFormValidationBundle.git
    target=/bundles/Trsteel/HtmlFormValidationBundle

运行以下命令更新您的 vendors

$ php ./bin/vendors

将 Trsteel 命名空间添加到您的自动加载器中。

<?php
// app/autoload.php

$loader->registerNamespaces(array(
    'Trsteel' => __DIR__.'/../vendor/bundles',
    // your other namespaces
));

将 bundle 添加到应用程序内核中。

<?php
// app/AppKernel.php
    public function registerBundles()
    {
        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            // ...
            $bundles[] = new Trsteel\HtmlFormValidationBundle\TrsteelHtmlFormValidationBundle();
            // ...
        }
    }