LabiciIvan / php-api-nutritional-project

A PHP API nutritional project
0 stars 0 forks source link

ValidationBase::class - to validate request fields #36

Open LabiciIvan opened 1 month ago

LabiciIvan commented 1 month ago

Description:

Create a new ValidationBase::class in the App/Classes directory.

Create a new 'ValidationBaseInterfacein the App/Interfaces directory and add any necessary interface methods which will be required by the ValidationBase::class.

This class will need to be extended by any other resource which will need validation for certain fields.

This class will have the following validation capabilities:

The class will have the following method and will accept two parameters:

public function validate(string $rules, array $data):