System Information
- Strapi Version: v4.5
- Operating System: windows 11
- Database:postgres
- Node Version: v16.14.0
- NPM Version: v8.6.0
- Yarn Version: 1v.22.19
How to write required fields validation in lifecycle hooks at admin panel level. similar to below code
beforeCreate(data) {
// calling a custom services which handles the validation process
// and returns a message if something is wrong and true if everything is ok
let message = await strapi.services**.zzz.validation**(data);
if (message != true){
throw new Error(message);
}
},