How to validate a form request
Yii 2 (which is what Craft 3 is built upon) has similar looking form/model validation:

https://www.yiiframework.com/doc/guide/2.0/en/input-validation

https://www.yiiframework.com/doc/guide/2.0/en/tutorial-core-validators

You can also look at how Craft does it in its own models and controllers.