When we are working with signup/registration, adding user, update profile, etc in web application then we need to validate password and confirm password fields. Here I showing you how to validate password and confirm password fields in CakePHP 3.1
Here I am using custom validation of CakePHP. CakePHP allowed us to write our own custom validation rules by using anonymous/callback function. Hope this will he helpful to you.