bower / registry

The Bower registry
https://registry.bower.io/packages
MIT License
292 stars 66 forks source link

Improve invalid package name errors #92

Closed patrickkettner closed 10 years ago

patrickkettner commented 10 years ago

Notcied a number of issues cropping up that boiled down to how bad the error message is, this attempts to fix that.

patrickkettner commented 10 years ago

yes. yes i could.

patrickkettner commented 10 years ago

these are all of the possible generated values - any copy suggestions?

Package names must be between 1 and 50 characters.                               
Package names must only contain lower case a through z, 0 through 9, dots, dashes, and underscores.
Package names must not have consecutive dashes, dots, or underscores.            
Package names must not start or end with dashes, dots, or underscores.           
Package names must be between 1 and 50 characters, and must only contain lower case a through z, 0 through 9, dots, dashes, and underscores.
Package names must be between 1 and 50 characters, and must not have consecutive dashes, dots, or underscores.
Package names must be between 1 and 50 characters, and must not start or end with dashes, dots, or underscores.
Package names must only contain lower case a through z, 0 through 9, dots, dashes, and underscores, and must not have consecutive dashes, dots, or underscores.
Package names must only contain lower case a through z, 0 through 9, dots, dashes, and underscores, and must not start or end with dashes, dots, or underscores.
Package names must not have consecutive dashes, dots, or underscores, and must not start or end with dashes, dots, or underscores.
Package names must be between 1 and 50 characters, only contain lower case a through z, 0 through 9, dots, dashes, and underscores, and must not have consecutive dashes, dots, or underscores.
Package names must be between 1 and 50 characters, not have consecutive dashes, dots, or underscores, and must not start or end with dashes, dots, or underscores.
Package names must be between 1 and 50 characters, only contain lower case a through z, 0 through 9, dots, dashes, and underscores, and must not start or end with dashes, dots, or underscores.
Package names must only contain lower case a through z, 0 through 9, dots, dashes, and underscores, not have consecutive dashes, dots, or underscores, and must not start or end with dashes, dots, or underscores.
Package names must be between 1 and 50 characters, only contain lower case a through z, 0 through 9, dots, dashes, and underscores, not have consecutive dashes, dots, or underscores, and must not start or end with dashes, dots, or underscores.
rayshan commented 10 years ago

Thanks! copy looks good. overall lgtm.

patrickkettner commented 10 years ago

@desandro - you good?

desandro commented 10 years ago

thumbs up

rayshan commented 10 years ago

deployed, thanks @patrickkettner @desandro

paulirish commented 10 years ago

Yay for communicative error messages! nice one @patrickkettner