info = new FieldInfo("file", "File", FieldType::FILE); } public function failMin(mixed $value): bool { if (is_null($value)) { return false; } return count($value) < $this->min; } public function failMax(mixed $value): bool { if (is_null($value)) { return false; } return count($value) < $this->min; } public function toJsonSchema(): Property { return new RefProperty( id: $this->name, title: Option::fromValue($this->label), description: Option::fromValue($this->help, ""), _ref: new Collection($this->collections), minItems: Option::fromValue($this->min), maxItems: Option::fromValue($this->max), comment: Option::fromValue($this->group, ""), ); } public function isRequired(): bool { return $this->min > 0; } }