Package org.zkoss.bind.validator
Class AbstractValidator
- java.lang.Object
-
- org.zkoss.bind.validator.AbstractValidator
-
- All Implemented Interfaces:
Validator
- Direct Known Subclasses:
BeanValidator
,FormBeanValidator
public abstract class AbstractValidator extends java.lang.Object implements Validator
A abstract validator the handling validation message- Since:
- 6.0.0
- Author:
- dennis
- See Also:
ValidationMessages
-
-
Constructor Summary
Constructors Constructor Description AbstractValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addInvalidMessage(ValidationContext ctx, java.lang.String message)
add a message to validation context, when you call this method, it also set context invalid.protected void
addInvalidMessage(ValidationContext ctx, java.lang.String key, java.lang.String message)
add a message to validation context, when you call this method, it also sets context invalid.protected void
addInvalidMessage(ValidationContext ctx, java.lang.String key, java.lang.String message, java.lang.Object value)
add a message to validation context, when you call this method, it also sets context invalid.protected void
addInvalidMessages(ValidationContext ctx, java.lang.String[] messages)
add multiple messages to validation context, when you call this method, it also sets the context invalid.protected void
addInvalidMessages(ValidationContext ctx, java.lang.String key, java.lang.String[] messages)
add multiple messages to validation context, when you call this method, it also sets the context invalid.protected void
addInvalidMessages(ValidationContext ctx, java.lang.String key, java.lang.String[] messages, java.lang.Object value)
add multiple messages to validation context, when you call this method, it also sets the context invalid.
-
-
-
Method Detail
-
addInvalidMessage
protected void addInvalidMessage(ValidationContext ctx, java.lang.String message)
add a message to validation context, when you call this method, it also set context invalid.- Parameters:
ctx
- the validation contextmessage
- the message of validation
-
addInvalidMessage
protected void addInvalidMessage(ValidationContext ctx, java.lang.String key, java.lang.String message)
add a message to validation context, when you call this method, it also sets context invalid.- Parameters:
ctx
- the validation contextkey
- the custom key of messagemessage
- the message of validation
-
addInvalidMessage
protected void addInvalidMessage(ValidationContext ctx, java.lang.String key, java.lang.String message, java.lang.Object value)
add a message to validation context, when you call this method, it also sets context invalid.- Parameters:
ctx
- the validation contextkey
- the custom key of messagemessage
- the message of validationvalue
- the value of the rejected field- Since:
- 8.0.1
-
addInvalidMessages
protected void addInvalidMessages(ValidationContext ctx, java.lang.String[] messages)
add multiple messages to validation context, when you call this method, it also sets the context invalid.- Parameters:
ctx
- the validation contextmessages
- messages of validation
-
addInvalidMessages
protected void addInvalidMessages(ValidationContext ctx, java.lang.String key, java.lang.String[] messages)
add multiple messages to validation context, when you call this method, it also sets the context invalid.- Parameters:
ctx
- the validation contextkey
- the custom key of messagemessages
- messages of validation
-
addInvalidMessages
protected void addInvalidMessages(ValidationContext ctx, java.lang.String key, java.lang.String[] messages, java.lang.Object value)
add multiple messages to validation context, when you call this method, it also sets the context invalid.- Parameters:
ctx
- the validation contextkey
- the custom key of messagemessages
- messages of validationvalue
- the value of the rejected field- Since:
- 8.0.1
-
-