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
... ...
@@ -268,7 +268,7 @@ func (r *Root) validateName(name string) error {
268 268
 		return validationError{fmt.Errorf("volume name is too short, names should be at least two alphanumeric characters")}
269 269
 	}
270 270
 	if !volumeNameRegex.MatchString(name) {
271
-		return validationError{fmt.Errorf("%q includes invalid characters for a local volume name, only %q are allowed", name, utils.RestrictedNameChars)}
271
+		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)}
272 272
 	}
273 273
 	return nil
274 274
 }