ReqEase

Introduction to ReqEase Class

The heart of ReqEase lies in its powerful JavaScript class, aptly named ReqEase. This class provides a streamlined interface to handle form validation, make HTTP requests, and manage responses effortlessly. In this section, we'll explore the key aspects of the ReqEase class and its options.

ReqEase Options

The ReqEase class accepts a variety of options to tailor its behavior to your specific requirements. These options include settings for form validation, HTTP requests, response handling, and more.

Here's an overview of common ReqEase options:

  • form: The HTML form element you want ReqEase to work with.

  • okBtn: The button that triggers ReqEase's actions, often the form's submit button.

  • formValidator: Configuration options for Form Validator.

  • requester: Configuration options for making HTTP requests.

  • buildMode: Specifies when to build ReqEase (on initialization or every time).

These options allow you to fine-tune ReqEase to seamlessly integrate with your project's structure and requirements.

Example:

const reqEase = new ReqEase({
    buildMode: "everytime",
    form: $("#myForm"),
    okBtn: $("#okBtn"),
    : {
        // some validation options
    },
    : {
        // some requester options
    },
});

Last updated