mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 18:08:11 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			310 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			310 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 'use strict';
 | |
| 
 | |
| const { yup, validateYupSchema } = require('@strapi/utils');
 | |
| 
 | |
| const roleUpdateSchema = yup
 | |
|   .object()
 | |
|   .shape({
 | |
|     name: yup.string().min(1),
 | |
|     description: yup.string().nullable(),
 | |
|   })
 | |
|   .noUnknown();
 | |
| 
 | |
| module.exports = {
 | |
|   validateRoleUpdateInput: validateYupSchema(roleUpdateSchema),
 | |
| };
 |