mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 14:38:47 +02:00
N°7063 - Forms SDK - Add Symfony forms component
error forms issue
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
|
||||
namespace Combodo\iTop\FormSDK\Field;
|
||||
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* Description of a form field.
|
||||
*
|
||||
@@ -41,7 +43,12 @@ class FormFieldDescription
|
||||
private readonly array $aOptions
|
||||
)
|
||||
{
|
||||
$oCheckStatus = $this->oType->CheckOptions($this->aOptions);
|
||||
|
||||
if(!$oCheckStatus['valid']){
|
||||
$sInvalidOptions = implode(', ', $oCheckStatus['invalid_options']);
|
||||
throw new Exception("Invalid option(s) $sInvalidOptions provided for field $sName");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user