mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 04:22:16 +00:00
Expose AbstractProject.AbstractProjectDescriptor#validateLabelExpression for plugins
This commit is contained in:
1 parent
e607048d46
commit
e985ee69ff
1 file changed
+10
@@ -2043,6 +2043,16 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
|
||||
|
||||
public FormValidation doCheckLabel(@AncestorInPath AbstractProject<?,?> project,
|
||||
@QueryParameter String value) {
|
||||
return validateLabelExpression(value, project);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate label expression string.
|
||||
*
|
||||
* @param project May be specified to perform project specific validation.
|
||||
* @since TODO
|
||||
*/
|
||||
public static @Nonnull FormValidation validateLabelExpression(String value, @CheckForNull AbstractProject<?, ?> project) {
|
||||
if (Util.fixEmpty(value)==null)
|
||||
return FormValidation.ok(); // nothing typed yet
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user