Package de.xima.fc.form.common.models
Interface IXBaseValidationParams
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
IXGlobalValidationParams,IXValidationParams
- All Known Implementing Classes:
XGlobalValidationParams,XValidationParams
Base interface with common methods for both
IXValidationParams and IXGlobalValidationParams.- Since:
- 6.6.3
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionlongMap<String,? extends IFormContainerMetaData> getI18nValue(String i18nKey) default LocalebooleanWhether server-side validation should be performed.booleanisValuesEmpty(List<String[]> values)
-
Method Details
-
getClientId
long getClientId()- Returns:
- The ID of the current client to which the form belongs.
-
getFieldValuesMap
- Returns:
- A map with all values that were submitted. The key is the name of a form field.
-
getDynContainerMap
Map<String,? extends IFormContainerMetaData> getDynContainerMap()- Returns:
- A map with the meta data for repeated elements. The key is the name of a form field.
-
getFormRenderConfig
IXFormRenderConfig getFormRenderConfig()- Returns:
- The current form render config for accessing the global configuration of the validation process.
-
getFRQSessionAttributes
Map<Serializable,Serializable> getFRQSessionAttributes()- Returns:
- All attributes from the current form request session.
-
getI18nValue
- Parameters:
i18nKey- I18n key for the localized message.- Returns:
- The localized message for the given key, retrieved from the built-in resource bundle. Plugin resource bundles are not considered.
-
getLocale
- Returns:
- The current locale to be used for creating error messages.
-
getValues
- Parameters:
key- Name of a form field.- Returns:
- All values that were submitted for the given for the given form field name. The list contains multiple
items when the form field is repeated; the array contains multiple items when the form field submitted
multiple values (e.g. a select element with
multipleset).
-
isValuesEmpty
- Parameters:
values- List of values of a form field.- Returns:
trueif the values are all empty, orfalseotherwise.
-
isShouldValidate
boolean isShouldValidate()Whether server-side validation should be performed. Server-validation may be disabled due to one of several reasons:- The element is not rendered due to a state or user group condition.
- The element is disabled due to a state or user group condition.
- The form action does not require validation. When designing a form, the user can choose whether the form
should be validated when the a submit button is pressed. This returns
truewhen a submit button was pressed that requires the form to be validated, andfalse.
false. However, there are some use cases when validation needs to be performed no matter the circumstances. In that case, this flag may be ignored.- Returns:
- Whether the form element should be validated.
-