Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[Form] simplified previous merge and fixed unit test

  • Loading branch information...
commit 928f32101cacc4499b1070b08335923972a3f7a5 1 parent 4de646c
@fabpot fabpot authored
Showing with 1 addition and 19 deletions.
  1. +0 −16 Exception/FormNotBoundException.php
  2. +1 −3 Form.php
View
16 Exception/FormNotBoundException.php
@@ -1,16 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Form\Exception;
-
-class FormNotBoundException extends FormException
-{
-}
View
4 Form.php
@@ -14,7 +14,6 @@
use Symfony\Component\Form\Event\DataEvent;
use Symfony\Component\Form\Event\FilterDataEvent;
use Symfony\Component\Form\Exception\FormException;
-use Symfony\Component\Form\Exception\FormNotBoundException;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Symfony\Component\Form\Exception\TransformationFailedException;
use Symfony\Component\HttpFoundation\Request;
@@ -676,11 +675,10 @@ public function isEmpty()
public function isValid()
{
if (!$this->isBound()) {
- throw new FormNotBoundException('Can not validate a form that is not bound');
+ throw new \LogicException('You cannot call isValid() on a form that is not bound.');
}
if ($this->hasErrors()) {
-
return false;
}
Please sign in to comment.
Something went wrong with that request. Please try again.