Skip to Content
Account
Enter the email address on your account.
Forgot Your Username?
Enter your password.
Forgot Your Password?

Or continue with

You're Viewing J2Store 4 Documentation.

View This Page for J2Commerce 6

J2Store 4

Data Validation

3 Min Read
On This Page

The data validation app is especially useful on the checkout page. With the data validation app, you can create rules so that only valid data from the customer is accepted into the various checkout fields. A checkout field that requires the phone number of the customer can be configured to accept only numeric input from the customer. You can also set it to reject special characters and letters. This way, the customer will be informed to only enter a valid phone number, address, or any other details in the checkout field.

Requirements

  1. PHP 8.1.0 +
  2. Joomla! 4.x/ Joomla! 5.x +
  3. J2Commerce / J2Store 4.x +

Purchase the App

Step 1: Go to our J2Commerce website > Extensions > Apps

Step 2: Locate the Data Validation App > click View Details > Add to cart > Checkout.

Step 3: Go to your My Downloads under your profile button at the top right corner and search for the app. Click Available Versions > View Files > Download Now

Install the App

Go to System > Install > Extensions > Install the app

Data Validation

Enable the App

Go to J2Commerce > Apps > search for the Data Validation app

Click on the 'X' under Status to enable it.

J2Commerce All Apps list searched for "data", with Apps menu, search box and the enabled status check for Data Validation highlighted

Click on "Open App" or the Title to start setting up the app

J2Commerce All Apps list searched for "data", with the Open App button highlighted on the enabled Data Validation row

Setting up the Parameters

Basic tab

Data Validation

The app will show you 3-column tables.

  • Custom Fields:
  • Rules Apply for:
  • Rules:

Custom Fields: All the custom fields you have in the J2Commerce custom fields section will be listed in this column.

If you want to add a new Custom Field, go to J2Commerce > Setup > Custom Fields

J2Commerce Dashboard with the Setup menu open and the Custom Fields item highlighted, with J2Commerce selected in the sidebar

Rules Apply for: You can choose at which section (Billing, Shipping, Payment) the rule should be applied. Choose Billing or shipping or payment or all three.

Rules: Click on the “Add Rules” button to display the dropdown lists of 10 types of rules. You can select the rule to be applied from the dropdown list.

Available rules are: Match Field, Max Length, Min Length, Numeric, Alphabet, Alphanumeric, Phone, Email, Postal/Zip Code, and Match Table Field.

For example, if you would like to apply rules for the field “Billing”, go to the field Billing and navigate to the column Rules Apply For and choose the section where you actually would like to apply the rules. If you choose Billing, the validation rule will be applied only at Billing section.

Now move to the column “Rules” and click the " Add Rules button. Choose the rules from the dropdown list. In our case, choose Numeric.

You can add multiple rules to every individual field.

Data Validation app, Basic Settings tab: First name field with Billing selected and rules Numeric, Phone, Email and Postal/Zip Code Validation highlighted

Frontend View

dv02

Related Products

Related Products

Still stuck? Our team can help.

Back to Top