Interface LabelValidator

  • All Superinterfaces:
    ExtensionPoint

    public interface LabelValidator
    extends ExtensionPoint
    Plugins may want to contribute additional restrictions on the use of specific labels for specific context items. This extension point allows such restrictions.
    Since:
    2.243
    • Method Detail

      • check

        @NonNull
        FormValidation check​(@NonNull
                             Item item,
                             @NonNull
                             Label label)
        Validates the use of a label within a particular context.

        Note that "OK" responses (and any text/markup that may be set on them) will be ignored. Only warnings and errors are taken into account, and aggregated across all validators.

        Parameters:
        item - The context item to be restricted by the label.
        label - The label that the job wants to restrict itself to.
        Returns:
        The validation result.