org.srplib.validation.ValidationError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of srp-validation Show documentation
Show all versions of srp-validation Show documentation
Single Responsibility Principle (SRP) libraries collection
package org.srplib.validation;
import java.io.Serializable;
/**
* Models single validation error. Holds error message and optionally an invalid form field.
*
* @author Anton Pechinsky
*/
public interface ValidationError extends Serializable {
/**
* Returns validation error message.
*
* @return String error message.
*/
String getError();
/**
* Returns validation context.
*
* This may be a field, a form, a panel etc. In other words context is reference to object is being validated.
*
* @return Object an object representing context, null
if error isn't associated with particular context.
*/
Object getContext();
}