info = new FieldInfo("text", "Text", FieldType::STRING); } public function format(FieldData $input, FieldData $output): FieldData { $value = $input->get($this->name); $output->set($this->name,$value); return $output; } public function failRequired(mixed $value): bool { return empty(trim($value)); } public function toJsonSchema(): Property { return new TypeProperty( type: PropertyType::STRING, id: $this->name, title: Option::fromValue($this->label), description: Option::fromValue($this->help, ""), default: Option::fromValue($this->default, ""), minLength: Option::fromValue($this->min), maxLength: Option::fromValue($this->max), readOnly: Option::fromValue($this->readonly, false), enum: Option::fromValue(array_keys($this->selectOptions ?? []),[]), comment: Option::fromValue($this->group, ""), format: none(), ); } public function isRequired(): bool { return $this->required; } }