N°7063 - Forms SDK - Add Symfony forms component

error forms issue
This commit is contained in:
Benjamin Dalsass
2024-01-02 11:31:52 +01:00
parent 2bcc4d9989
commit 75fde4c9a3
15 changed files with 316 additions and 73 deletions

View File

@@ -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");
}
}
/**