Browse code

fixes #17734, clear message for host volumes not starting with /

Signed-off-by: Muayyad Alsadi <alsadi@gmail.com>

Muayyad Alsadi authored on 2016/11/02 19:18:48
Showing 1 changed files
... ...
@@ -269,7 +269,7 @@ func (r *Root) validateName(name string) error {
269 269
 		return validationError{fmt.Errorf("volume name is too short, names should be at least two alphanumeric characters")}
270 270
 	}
271 271
 	if !volumeNameRegex.MatchString(name) {
272
-		return validationError{fmt.Errorf("%q includes invalid characters for a local volume name, only %q are allowed", name, utils.RestrictedNameChars)}
272
+		return validationError{fmt.Errorf("%q includes invalid characters for a local volume name, only %q are allowed. If you intented to pass host directory use absolute path starting with /", name, utils.RestrictedNameChars)}
273 273
 	}
274 274
 	return nil
275 275
 }