public interface

FormErrors

com.atlassian.bitbucket.validation.FormErrors
Known Indirect Subclasses

Class Overview

A container of field and one or more associated errors, to be displayed in a form.

Used by FormValidationException.

Summary

Public Methods
@Nonnull Collection<String> getErrors(String field)
@Nonnull Map<StringCollection<String>> getFieldErrors()
@Nonnull Collection<String> getFormErrors()
boolean isEmpty()
Indicates whether this instance of errors is empty, or has any errors.

Public Methods

@Nonnull public Collection<String> getErrors (String field)

Parameters
field that potentially contains some errors
Returns
  • the error in question or an empty collection

@Nonnull public Map<StringCollection<String>> getFieldErrors ()

Returns
  • a map of fields to a collection of at least one associated error

@Nonnull public Collection<String> getFormErrors ()

Returns
  • a collection of errors on the form (ie not attached to a field)

public boolean isEmpty ()

Indicates whether this instance of errors is empty, or has any errors.

Returns
  • true, if this instance of FormErrors contains no errors of any type, false otherwise