refactor fields

This commit is contained in:
2024-03-21 22:33:41 +02:00
parent bb77a37ff7
commit 8526fd471f
68 changed files with 635 additions and 297 deletions
+4 -9
View File
@@ -4,11 +4,10 @@ namespace Lucent\Schema\Ui;
use Lucent\JsonSchema\Property\Property;
use Lucent\JsonSchema\Property\RefProperty;
use Lucent\JsonSchema\Property\RefType;
use Lucent\Primitive\Collection;
use Lucent\Schema\FieldInfo;
use Lucent\Schema\FieldInterface;
use Lucent\Schema\FieldType;
use Lucent\Schema\Field\FieldInfo;
use Lucent\Schema\Field\FieldInterface;
use Lucent\Schema\Field\FieldType;
use Lucent\Schema\Validator\MinMaxInterface;
use PhpOption\Option;
@@ -28,17 +27,13 @@ class File implements FieldInterface, MinMaxInterface
public ?int $min = null,
public ?int $max = null,
public array $collections = [],
public string $data = "",
public string $group = "",
)
{
$this->info = new FieldInfo("file", "File", FieldType::FILE);
}
public function format(array $input, array $output): array
{
return $output;
}
public function failMin(mixed $value): bool
{
if (is_null($value)) {