How do you perform Form validation without a model in Cakephp?

后端 未结 6 959
Happy的楠姐
Happy的楠姐 2021-02-13 00:06

I need to perform some validation. I don\'t have the model in the application.

Does anyone know how to do the validation without a model? Can you show me using a small s

6条回答
  •  温柔的废话
    2021-02-13 00:45

    Class Validation which is a subclass of Object is used by model class to perform validation against validation rules specified in it.

    One can directly instantiate Validation class inside any controller or model and use its methods for performing validation on any data, not only inputs from forms.

提交回复
热议问题