/** * Get the validation javascript as file path. * * @param \FormModel $model The form model. * @param \FormFieldModel[] $fields The form fields. * @param ValidationModel $settings The validation settings. * * @return string */ protected function getValidationJavascript($model, $fields, $settings) { if (!$this->cache->isCached($model->id, $this->locale) || \Config::get('bypassCache')) { $validation = $this->assembler->assemble($model, $fields, $settings, $this->locale); $javascript = $this->buildJavascript($validation); $this->cache->save($model->id, $javascript, $this->locale); } return $this->cache->filename($model->id, $this->locale); }