LogoLogo
DocsChangelogRoadmapAboutYouTube
  • Ergonode Manual
  • Dashboard
    • Dashboard
      • User menu and Action center
        • My profile
          • Activity log
          • Privileges
        • Settings
        • Action center
  • Products
    • Catalog
      • General
      • Template
      • History
      • Children
      • Variants
      • Comments
      • Creating new product
        • Simple products
        • Grouping product
        • Product with variants
      • Copy data from one product to another
      • System views
        • Table view (Grid view)
        • Tile view
        • Kanban view
        • Custom view
        • Display settings
      • Batch actions
        • Edit attribute values
          • Generate product descriptions
          • Generate product names
          • Translate content
          • Change values
          • Add prefix or suffix
          • Add values
          • Remove values
          • Clear values
        • Edit categories
        • Edit collections
        • Edit media names
        • Edit template
        • Edit status
        • Export to file
        • Delete products
          • Identification of related products
      • Filters (Advanced)
    • Segments
      • Create a new segment
      • General
      • Translations
      • Conditions
    • Collections
      • Create a new collection
      • General
      • Translations
      • Products
  • Product design
    • Attributes
      • Create a new attribute
      • General
      • Translations
      • Validation
      • Options
      • Custom Fields
        • Custom Fields - How it works
        • Custom Fields - Use Cases
        • Custom Fields - Ergonode Transfer
      • Metadata
      • Attributes Batch Actions
      • Attribute variables
    • Attribute groups
      • Create a new attribute group
      • General
      • Translations
    • Product templates
      • Main templates
        • Create a new template
        • Cloning the template
        • General
        • Translations
        • Designer
          • Widgets
      • Sections
        • Create a new section
        • Cloning the section
        • General
        • Translations
        • Designer
      • Completeness sets
        • General
        • Translations
    • Categories
      • Create a new category
      • General
      • Translations
      • Products
    • Category trees
      • General
      • Translations
      • Designer
    • Category attributes
      • Add attribute
      • Fill in a category attribute value
  • Data exchange
    • Product importer
      • Profiles
      • History
    • Ergonode transfer
      • Files format
      • Import
        • Creating a new import job
        • Running / Importing data
          • General
          • History
        • Importing grouping products and products with variants
      • Exports
        • Creating a new export job
        • Running / Exporting data
          • General
          • History
          • Scheduler
  • Resources
    • Media
      • Edit
        • General
        • Translations
        • Information
        • Relations
  • AUTOMATIONS
    • About Automations
      • Setting Up Automations
      • List of available Triggers, Conditions, and Actions
      • Example business cases with configuration
      • Automations FAQ
  • Apps
    • About Apps
      • Installed apps
      • Available apps
        • Baselinker
          • Options
          • Configuration
          • Scheduler
          • History
        • CSV
          • Options
          • Configuration
          • Scheduler
          • History
        • Channable Feed
          • Options
          • Configuration
          • Scheduler
          • History
        • Shopify CSV
          • Options
          • Configuration
          • History
  • Workflows
    • Information
      • General
        • New status
          • General
          • Translations
      • Designer
        • General
        • Conditions
  • System
    • Users
      • Change user password
      • General
      • Avatar
      • Language restrictions
      • Product Privileges
    • User roles
      • General
      • Privileges
      • Attribute privileges
    • Activities
      • Activity logs
      • Batch actions
    • Your plan
    • Settings
      • Languages
      • Units
      • API Keys
      • SKU
  • Plugins
    • About
    • Disclaimer
      • Magento 2 (new plugin)
      • Shopware
      • PrestaShop
      • WooCommerce
      • Magento 2 (old)
  • Tutorials and Video Clips
    • How to Write Effective Prompts
    • Using ticketing system
    • How to deal with entities
    • Youtube channel
Powered by GitBook
On this page
  • Introduction
  • About regex (available in text attribute only)
  • Included regex patterns
  • Custom regex validation error message

Was this helpful?

Export as PDF
  1. Product design
  2. Attributes

Validation

You can set a validator to already existing attributes but to save it, a value of this attribute in all products MUST match the validation parameters. If they don't, an error message will be displayed.

Introduction

Validators help protect data integrity by ensuring that only data meeting specific conditions is accepted into the system. For example, when dealing with text type attributes, you can use regular expressions (regex). Imagine regex as a pattern filter that checks if the attribute value looks correct; for instance, it verifies that an email address includes an "@" symbol. This helps maintain accuracy and prevent errors.

Different attribute types require different validation rules. A number might need to be within a certain range, whereas an image might need to fall within specific boundaries. Validators thus help maintain consistency across your data fields.

In Ergonode you can set validation to the following attribute types:

Attribute type
Available validators

File

  • Minimum number of files

  • Maximum number of files

  • Maximum file size

  • Allowed extensions

Gallery

  • Minimum number of images

  • Maximum number of images

  • Maximum file size

  • Allowed extensions

Image

  • Maximum file size

  • Allowed extensions

Numeric

  • Minimum value

  • Maximum value

Price

  • Minimum value

  • Maximum value

Text

  • Regular expression (regex) with examples

Textarea

  • List of banned words (1000 characters limit)

Unit

  • Minimum value

  • Maximum value

About regex (available in text attribute only)

In the system, you can use some predefined regex patterns, but it's possible to use your own. To use predefined ones click on the "Copy from regex templates".

Regular expressions, or regex, are like super-powered validation tools for text. They use a specific sequence of characters to form a specific pattern. You can think of it as a sophisticated “find,” but with more precision and flexibility. Here's how to use regex for validating:

  1. Basic Validation:

    • Suppose you want to validate any three-letter words. You'd use the pattern \b\w{3}\b. In this pattern, \b indicates word boundaries, and \w{3} specifies exactly three word characters.

  2. Digits Validation:

    • To validate any sequence of digits in text, use the pattern \d. Here, \d stands for any digit, so this will match any sequence of strings with a single digit in it. like 123, 4aa, or 678aaa9. If you wish to validate a string that ends with a digit use\d$, ex: something1.

  3. Email Addresses Validation:

    • If you're validated for email addresses, you might use something like \b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b. This looks for common email structures, checking for alphanumeric characters before and after the "@" symbol.

  4. Dates validation:

    • To validate the dates in the format DD/MM/YYYY, you could use \b\d{2}\/\d{2}\/\d{4}\b. Here, \d{2} finds exactly two digits, / is a literal slash, and \d{4} looks for four digits.

  5. Flexible Validation:

    • Sometimes, you might want to validate words that start with a certain letter. For example, to find words starting with “a” use \ba\w*\b. This looks for word boundaries (\b), the letter "a," and any number of word characters (\w*).

Regex provides a way to quickly find patterns and extract relevant information from text without manual searching. They might seem complex at first, but with practice, they become incredibly useful for tasks like data validation and text processing. Dive in and explore the endless possibilities they offer!

Included regex patterns

In Ergonode you will find some common regex patterns already included for your convenience.

Here is the list:

  • EAN-13

  • EAN-8

  • URL address

  • File Path

  • Alphanumeric (without space)

  • Alphanumeric (with space)

  • Numeric (whole numbers)

  • Numeric (dot separated)

  • Numeric (comma separated)

To use them click on Copy from regex templates and select one from the list.

Custom regex validation error message

You can set a custom validation error message for your user.

The message will be displayed on the validation box

and on the product card.

PreviousTranslationsNextOptions

Last updated 6 months ago

Was this helpful?

in the tooltip on the

in the (if the attribute is set to be one)

in the

Product catalog (Product grid)
Category attribute
Batch action
Text attrobute validation tab
Text attribute validation tab - cutom validation error messag
Product catalog - cutom validation error message