Danack / Params

Framework agnostic validation
MIT License
6 stars 1 forks source link

Parameter name for patching is dumb #3

Closed Danack closed 4 years ago

Danack commented 6 years ago

We define a patch rule like this:

$rules = [
            'name' => [
                new Patch($input, [PatchEntry::REPLACE]),
                new ExtractPatchPathValue(PatchEntry::REPLACE, '/name'),
                new Trim(),
                new MaxLength(128),
                new MinLength(4),
                new ValidCharacters('0-9a-zA-Z_\- ')
            ],
        ];

However.......'name' is almost meaningless here.

Danack commented 4 years ago

Patching is out of scope for this library for now.