How to implement validation for custom plugin fields?

Pretty old post, is there any documentation available yet?

Kinda need the specs/documentation on front-end validation managed by Kirby as well.