mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Merge pull request #267 from clintabrown/allow_underscore_in_flag
Allow underscores in name validation
This commit is contained in:
		
						commit
						4f98f80c61
					
				| @ -103,8 +103,8 @@ module.exports.router = function(config) { | ||||
|     router.post('/validate', (req, res) => { | ||||
|         req.checkBody('name', 'Name is required').notEmpty(); | ||||
|         req | ||||
|             .checkBody('name', 'Name must match format ^[0-9a-zA-Z\\.\\-]+$') | ||||
|             .matches(/^[0-9a-zA-Z\\.\\-]+$/i); | ||||
|             .checkBody('name', 'Name must match format ^[0-9a-zA-Z\\.\\-\\_]+$') | ||||
|             .matches(/^[0-9a-zA-Z\\.\\-\\_]+$/i); | ||||
| 
 | ||||
|         validateRequest(req) | ||||
|             .then(validateUniqueName) | ||||
| @ -115,8 +115,8 @@ module.exports.router = function(config) { | ||||
|     router.post('/', (req, res) => { | ||||
|         req.checkBody('name', 'Name is required').notEmpty(); | ||||
|         req | ||||
|             .checkBody('name', 'Name must match format ^[0-9a-zA-Z\\.\\-]+$') | ||||
|             .matches(/^[0-9a-zA-Z\\.\\-]+$/i); | ||||
|             .checkBody('name', 'Name must match format ^[0-9a-zA-Z\\.\\-\\_]+$') | ||||
|             .matches(/^[0-9a-zA-Z\\.\\-\\_]+$/i); | ||||
|         const userName = extractUser(req); | ||||
| 
 | ||||
|         validateRequest(req) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user