[ML] Correct error message for invalid job_id (elastic/x-pack-elasticsearch#1218)

relates elastic/x-pack-elasticsearch#1211

Original commit: elastic/x-pack-elasticsearch@5389a43706
This commit is contained in:
Dimitris Athanasiou 2017-04-26 18:17:06 +01:00 committed by GitHub
parent 444cbfc283
commit 1f57a53b3e
2 changed files with 3 additions and 3 deletions

View File

@ -31,8 +31,8 @@ public final class Messages {
public static final String INCONSISTENT_ID =
"Inconsistent {0}; ''{1}'' specified in the body differs from ''{2}'' specified as a URL argument";
public static final String INVALID_ID =
"Invalid {0}; ''{1}'' must be lowercase alphanumeric, may contain hyphens or underscores, may not start with underscore";
public static final String INVALID_ID = "Invalid {0}; ''{1}'' can contain lowercase alphanumeric (a-z and 0-9), hyphens or " +
"underscores; must start and end with alphanumeric";
public static final String JOB_AUDIR_DATAFEED_DATA_SEEN_AGAIN = "Datafeed has started retrieving data again";
public static final String JOB_AUDIT_CREATED = "Job created";

View File

@ -59,7 +59,7 @@
---
"Test job config that is invalid only because of the job ID":
- do:
catch: /Invalid job_id; '_' must be lowercase alphanumeric, may contain hyphens or underscores, may not start with underscore/
catch: /Invalid job_id; '_' can contain lowercase alphanumeric \(a-z and 0-9\), hyphens or underscores; must start and end with alphanumeric/
xpack.ml.validate:
body: >
{