Added validation rules resolve gh-254. Removed empty sql files. Improved the field area.

This commit is contained in:
2018-03-27 11:57:16 +02:00
parent 856a6fad3f
commit 0ba2a0e8cf
72 changed files with 5002 additions and 337 deletions

View File

@ -815,6 +815,21 @@ class Infusion extends Interpretation
// set the module
$this->fileContentDynamic['ajax']['###AJAX_SITE_MODEL_METHODS###'] = $this->setAjaxModelMethods('site');
}
// build the validation rules
if (isset($this->validationRules) && ComponentbuilderHelper::checkArray($this->validationRules))
{
foreach ($this->validationRules as $rule => $_php)
{
// setup rule file
$target = array('admin' => 'a_rule_zi');
$this->buildDynamique($target, 'rule', $rule);
// set the JFormRule Name
$this->fileContentDynamic['a_rule_zi_'.$rule]['###Name###'] = ucfirst($rule);
// set the JFormRule PHP
$this->fileContentDynamic['a_rule_zi_'.$rule]['###VALIDATION_RULE_METHODS###'] = PHP_EOL . $_php;
}
}
// run the second run if needed
if (isset($this->secondRunAdmin) && ComponentbuilderHelper::checkArray($this->secondRunAdmin))