This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Form
Fabien Potencier 53a39b791e feature #27580 [Form] Add ability to clear form errors (colinodell)
This PR was squashed before being merged into the 4.2-dev branch (closes #27580).

Discussion
----------

[Form] Add ability to clear form errors

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14060
| License       | MIT
| Doc PR        | symfony/symfony-docs#9916

This PR adds the ability to manually clear form errors, thus improving the DX issue reported in #14060.

Unlike my original approach in #14233 and #27571 which break BC, this adds a new `ClearableErrorInterface` which `Form` implements.  (`Button` does not implement it because buttons can't have errors.)

Commits
-------

9eb755c07f [Form] Add ability to clear form errors
2018-06-25 11:51:57 +02:00
..
ChoiceList Add choice_translation_locale option for Intl choice types 2018-04-20 11:42:13 -04:00
Command Add debug:form type option 2017-10-03 06:15:18 -04:00
Console Remove group options without data and fix normalization 2017-12-13 00:39:36 -05:00
DependencyInjection Merge branch '3.4' into 4.0 2017-12-08 16:46:13 +01:00
Exception Revert "feature #26702 Mark ExceptionInterfaces throwable (ostrolucky)" 2018-05-30 09:26:09 +02:00
Extension Merge branch '4.0' into 4.1 2018-06-22 10:59:39 +02:00
Guess Replace more docblocks by type-hints 2017-11-07 15:45:01 +01:00
Resources [Validator] Remove BOM in some xlf files 2018-06-19 10:02:14 +02:00
Test [Form] fix tests on old phpunit versions 2018-05-22 14:52:11 +02:00
Tests feature #27580 [Form] Add ability to clear form errors (colinodell) 2018-06-25 11:51:57 +02:00
Util Merge branch '2.8' into 3.4 2018-05-07 09:00:50 +02:00
.gitignore
AbstractExtension.php [Form] removed deprecated FormType::getName() 2015-10-01 16:20:48 +02:00
AbstractRendererEngine.php Merge branch '3.4' 2017-11-05 17:26:21 +01:00
AbstractType.php Merge branch '2.7' into 2.8 2016-06-29 07:29:29 +02:00
AbstractTypeExtension.php [DI] minor docblock fixes 2017-10-24 13:40:19 +02:00
Button.php Fixed Button::setParent() when already submitted 2018-01-25 12:47:49 +01:00
ButtonBuilder.php [2.7][DX] Use constant message contextualisation for deprecations 2017-12-20 15:36:51 +01:00
ButtonTypeInterface.php
CallbackTransformer.php Merge branch '2.8' into 3.3 2017-11-05 16:47:03 +01:00
CHANGELOG.md [Form] Deprecate searchAndRenderBlock returning empty string 2018-06-25 08:47:55 +02:00
ClearableErrorsInterface.php [Form] Add ability to clear form errors 2018-06-25 11:51:51 +02:00
ClickableInterface.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
composer.json Merge branch '2.8' into 3.4 2018-05-21 12:06:52 +02:00
DataMapperInterface.php [CS] Apply phpdoc_annotation_without_dot 2017-09-11 13:37:52 -07:00
DataTransformerInterface.php [CS] Apply phpdoc_annotation_without_dot 2017-09-11 13:37:52 -07:00
Form.php [Form] Add ability to clear form errors 2018-06-25 11:51:51 +02:00
FormBuilder.php Replace more docblocks by type-hints 2017-11-07 15:45:01 +01:00
FormBuilderInterface.php Merge branch '2.8' into 3.2 2017-06-23 08:35:45 +02:00
FormConfigBuilder.php [2.7][DX] Use constant message contextualisation for deprecations 2017-12-20 15:36:51 +01:00
FormConfigBuilderInterface.php Remove useless docblocks 2017-10-29 10:49:53 +01:00
FormConfigInterface.php [Form] Fix phpdoc 2017-09-19 13:52:15 +02:00
FormError.php Replace more docblocks by type-hints 2017-11-07 15:45:01 +01:00
FormErrorIterator.php Merge branch '2.8' into 3.3 2017-11-05 16:47:03 +01:00
FormEvent.php [2.7] More docblock fixes 2017-11-07 15:04:08 +01:00
FormEvents.php fix the constant value to be consistent with the name 2017-10-19 12:41:04 -04:00
FormExtensionInterface.php
FormFactory.php fixed some deprecation messages 2017-12-31 06:12:25 +01:00
FormFactoryBuilder.php [Form] Removed unused ResolvedTypeFactory in FormFactory constructor 2017-01-10 21:49:17 +01:00
FormFactoryBuilderInterface.php [DI] minor docblock fixes 2017-10-24 13:40:19 +02:00
FormFactoryInterface.php [3.0] Clean Form, Validator, DowCrawler and some more 2015-10-02 19:05:43 +02:00
FormInterface.php fixed CS 2018-05-11 17:58:37 +02:00
FormRegistry.php Merge branch '2.8' into 3.4 2018-05-01 15:53:27 -07:00
FormRegistryInterface.php [Form] remove validation of FormRegistry::getType as FormRegistry::hasType does not validate either 2015-10-22 02:46:43 +02:00
FormRenderer.php [Form] Deprecate searchAndRenderBlock returning empty string 2018-06-25 08:47:55 +02:00
FormRendererEngineInterface.php Merge branch '3.4' 2017-11-05 17:26:21 +01:00
FormRendererInterface.php [Form] Add useDefaultThemes flag to the interfaces 2017-10-19 17:17:33 +02:00
Forms.php Add scalar typehints/return types on final/internal/private code 2017-08-31 22:46:21 +02:00
FormTypeExtensionInterface.php Merge branch '2.8' into 3.3 2017-10-24 16:05:06 +02:00
FormTypeGuesserChain.php Replace more docblocks by type-hints 2017-11-07 15:45:01 +01:00
FormTypeGuesserInterface.php DX: replace @link with @see annotation 2016-11-13 18:41:36 +01:00
FormTypeInterface.php Merge branch '2.7' into 2.8 2016-06-29 07:29:29 +02:00
FormView.php fixed CS 2018-05-16 14:49:49 +02:00
LICENSE fixed years in copyright 2018-01-03 08:23:28 +01:00
NativeRequestHandler.php [Form] Add phpdoc to RequestHandlerInterface::isFileUpload() method 2017-11-20 18:59:30 +01:00
phpunit.xml.dist fail when detecting risky tests 2017-04-12 09:39:27 +02:00
PreloadedExtension.php Merge branch '2.8' into 3.3 2017-11-05 16:47:03 +01:00
README.md Updated all the README files 2016-03-04 08:12:06 +01:00
RequestHandlerInterface.php [Form] Add phpdoc to RequestHandlerInterface::isFileUpload() method 2017-11-20 18:59:30 +01:00
ResolvedFormType.php fixed some deprecation messages 2017-12-31 06:12:25 +01:00
ResolvedFormTypeFactory.php
ResolvedFormTypeFactoryInterface.php
ResolvedFormTypeInterface.php Merge branch '2.8' into 3.1 2016-12-29 22:40:29 +01:00
ReversedTransformer.php [DI] minor docblock fixes 2017-10-24 13:40:19 +02:00
SubmitButton.php Fixed submitting disabled buttons 2018-01-25 12:52:22 +01:00
SubmitButtonBuilder.php
SubmitButtonTypeInterface.php

Form Component

The Form component allows you to easily create, process and reuse HTML forms.

Resources