public static interface

Validator.Result

com.atlassian.validation.Validator.Result
Known Indirect Subclasses

Class Overview

Post-validation state. Enables access to the value object and failure case details like error messages.

Summary

Public Methods
String get()
If valid returns the value in string form.
String getErrorMessage()
If validation failed, the reason is found here in plain text.
String getErrorMessageHtml()
If validation failed, the reason is found here in html.
boolean isValid()
Whether the validation succeeded.

Public Methods

public String get ()

If valid returns the value in string form.

Returns
  • the value.
Throws
IllegalStateException if the result is not valid.

public String getErrorMessage ()

If validation failed, the reason is found here in plain text.

Returns
  • the error message if any, or null if validation succeeded.

public String getErrorMessageHtml ()

If validation failed, the reason is found here in html.

Returns
  • the error message if any, or null if validation succeeded.

public boolean isValid ()

Whether the validation succeeded.

Returns
  • true only if validaiton was successful.