public final class Failure extends Object implements Validator.Result
Validator.Result that represents epic validation failure.| Constructor and Description |
|---|
Failure(String message)
Creates failure from a given text message, encoding the text message as a whole into html for the html message.
|
Failure(String textError,
String htmlError)
Creates failure from a text message and an html equivalent message.
|
| Modifier and Type | Method and Description |
|---|---|
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 Failure(String message)
message - the failure message in text.public boolean isValid()
Validator.ResultisValid in interface Validator.Resultpublic String getErrorMessage()
Validator.ResultgetErrorMessage in interface Validator.Resultpublic String getErrorMessageHtml()
Validator.ResultgetErrorMessageHtml in interface Validator.Resultpublic String get() throws IllegalStateException
Validator.Resultget in interface Validator.ResultIllegalStateException - if the result is not valid.Copyright © 2002-2021 Atlassian. All Rights Reserved.