I'd like to validate the data sent to my end point.
https://www.shawnhooper.ca/2017/02/15/wp-rest-secrets-found-reading-core-code/ This post referenced the undocumented validation options. I have got 90% of what I need but now need to validate a strings length which I can't seem to figure out.
Basically I need to say the max length is X. I tried 'maxLength' but that isn't working. Has anyone done this or better yet is there any documentation on this, the post I found was quite old.
'args' => array( 'external_id' => array( 'required' => true, 'type' => 'string', 'description' => 'external id', 'maxLength' => 10 ) )