How to Create a Validation Function?⚡
Last updated
Use a Validation Function to enforce rules during the cart or checkout process, ensuring data accuracy and a seamless customer experience. Follow the steps below:
Navigate to the Nexus Dashboard and click Create Function.
Select Validation Functions from the list.
Click on Conditional Cart & Checkout Validation.
A setup screen will appear.
Enter the Function Name.
Select the Function Input Type.
Choose conditions based on your specific requirements (e.g., customer tags, cart total, shipping method).
Click on Add Validation Error to begin setting up your validation rule.
A popup will appear.
Select the User Journey: Choose the page where the error should appear (e.g., Cart or Checkout).
Select the Target: Define the specific field or section (e.g., Email, Phone, Address).
Enter the Error Message: This is the message customers will see when validation fails.
You can add multiple validation errors if needed.
To ensure your function works correctly and is enforced during checkout:
Scroll down to the Validation Settings section.
Check the box labeled Active to enable the validation function.
Check Block on failure if you want the checkout to stop when the conditions of your function are not met (e.g., if the required bundle items aren't in the cart).
Once everything is set, click Save to create your validation function.
🎉 You're all set! Enjoy a smarter, smoother checkout experience with Nexus Function. 😊
To explore examples and better understand how different functions work, visit our FAQs section — it’s packed with helpful guides, use cases, and setup examples.
Last updated