use Rakit\Validation\Validator; $validator = new Validator; $validation = $validator->make([ 'email' => 'example@domain.com', ], [ 'email' => 'required|email', ]); $validation->validate(); // true
use Rakit\Validation\Validator; $validator = new Validator; $validation = $validator->make([ 'password' => 'password123', ], [ 'password' => [ 'required', 'min:8', 'regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/', ], ]); $validation->validate(); // trueThis package library is the Rakit Validation package. It provides a simple and easy-to-use validation engine that can be used to validate various input types. It is also customizable and can be extended to meet the requirements of specific applications.