Class LengthValidation
java.lang.Object
org.iplass.mtp.entity.definition.ValidationDefinition
org.iplass.mtp.entity.definition.validations.LengthValidation
- All Implemented Interfaces:
- Serializable
文字列の長さをチェックするValidation。
 文字列長が、min以上、max以下ではない場合、エラー。
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionLengthValidation(Integer min, Integer max, String errorMessage) LengthValidation(Integer min, Integer max, String errorMessage, String errorCode) LengthValidation(Integer max, String errorMessage) LengthValidation(Integer max, String errorMessage, String errorCode) 
- 
Method SummaryModifier and TypeMethodDescriptiongetMax()getMin()booleanbooleanサロゲートペア文字を1文字としてカウントするか否か。 デフォルト値はtrue。 バイト数でカウントする場合は、この設定は意味を成さない。voidsetCheckBytes(boolean checkBytes) バイト数でチェックしたい場合、trueをセットvoidvoidvoidsetSurrogatePairAsOneChar(boolean surrogatePairAsOneChar) サロゲートペア文字を1文字としてカウントする場合はtrueをセット。 未設定の場合のデフォルト値はtrue。Methods inherited from class org.iplass.mtp.entity.definition.ValidationDefinitionaddLocalizedErrorMessage, getDescription, getErrorCode, getErrorMessage, getLocalizedErrorMessageList, getMessageCategory, getMessageId, getValidationSkipScript, setDescription, setErrorCode, setErrorMessage, setLocalizedErrorMessageList, setMessageCategory, setMessageId, setValidationSkipScript
- 
Constructor Details- 
LengthValidationpublic LengthValidation()
- 
LengthValidation
- 
LengthValidation
- 
LengthValidation
- 
LengthValidation
 
- 
- 
Method Details- 
isSurrogatePairAsOneCharpublic boolean isSurrogatePairAsOneChar()サロゲートペア文字を1文字としてカウントするか否か。 デフォルト値はtrue。 バイト数でカウントする場合は、この設定は意味を成さない。- Returns:
 
- 
setSurrogatePairAsOneCharpublic void setSurrogatePairAsOneChar(boolean surrogatePairAsOneChar) サロゲートペア文字を1文字としてカウントする場合はtrueをセット。 未設定の場合のデフォルト値はtrue。- Parameters:
- surrogatePairAsOneChar-
 
- 
isCheckBytespublic boolean isCheckBytes()
- 
setCheckBytespublic void setCheckBytes(boolean checkBytes) バイト数でチェックしたい場合、trueをセット- Parameters:
- checkBytes-
 
- 
getMax
- 
setMax
- 
getMin
- 
setMin
 
-