Reference
ReqEase Module
1. form: HtmlFormGeneralElement
form: HtmlFormGeneralElement
Description: This option represents the HTML form element that ReqEase will handle. You can provide the form element using various methods such as selecting it by its
id
, using a DOM element, or selecting it with jQuery.Example:
2. okBtn: HtmlButtonGeneralElement
okBtn: HtmlButtonGeneralElement
Description: Specifies the button element that triggers the form submission when clicked. Similar to the
form
option, you can provide this element using itsid
, a DOM element, or jQuery selection.Example:
3. formValidator: FormValidationOptionsEntered
formValidator: FormValidationOptionsEntered
Description: The
formValidator
option contains a variety of settings related to form validation. It allows you to configure how form validation behaves.Example:
4. requester: RequesterOptionsEntered
requester: RequesterOptionsEntered
Description: The
requester
option is used to configure settings related to sending requests. It allows you to specify how data should be sent to the server, handle responses, and manage loading indicators.Example:
5. buildMode: BuildMode | BuildModeString
buildMode: BuildMode | BuildModeString
Description: This option specifies when ReqEase should build the form. It can be set to build the form on initialization (
BuildMode.onInit
) or rebuild it every time (BuildMode.everytime
) it's requested.Example:
Types Used in ReqEase
ReqEase
HtmlFormGeneralElement
HtmlFormGeneralElement
Description: Represents an HTML form element. You can use this type to reference form elements in the DOM.
Example:
FormValidationOptionsEntered
FormValidationOptionsEntered
Description: Configuration options for form validation. This type allows you to specify various settings related to validation, including validation source, callbacks, constraints, custom messages, and more.
Example:
ValidatorsSource
ValidatorsSource
Description: An enum type that provides options for specifying the source of validators. You can choose between using all available validators (
ValidatorsSource.FULL
) or only the defined ones (ValidatorsSource.ONLY_DEFINED
).Example:
ValidatorCallbacks
ValidatorCallbacks
Description: This interface defines callback functions for validation success and failure. You can use these callbacks to perform actions when validation passes or fails.
Example:
FormValidatorStrings
FormValidatorStrings
Description: Custom strings for validation messages. You can define specific messages for various validation scenarios, such as format, length, required fields, and CAPTCHA.
Example:
CustomValidation
CustomValidation
Description: A custom validation function that takes a callback as an argument. You can implement custom validation logic and use the callback to indicate whether validation succeeded or failed.
Example:
FieldValidatorEntered
FieldValidatorEntered
Description: Specifies validators for form fields. This type allows you to define constraints and the corresponding field elements that should be validated.
Example:
InputMessageRenderer
InputMessageRenderer
Description: Custom renderer for input messages. You can define how validation messages are displayed for form inputs, including logic for building, rendering, and removing messages.
Example:
RequesterOptionsInterface
RequesterOptionsInterface
Description: Configuration options for sending requests. This type allows you to specify modal handlers, data to send, callbacks for responses, and more.
Example:
Last updated