You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following example specifies the format for a "Manufacturer Part Number."
100
+
This following example specifies the format for a "Manufacturer Part Number", defined with the `manufacturer_part_number` identifier.
104
101
105
-
According to the pattern option, the value:
102
+
The pattern is specified using a regular expression.
103
+
According to the pattern option, the attribute value:
106
104
107
105
- must be a string
108
-
- uses a regular expression
109
-
- begins with three capital letters
110
-
- ends with five numbers
106
+
- begins with three capital letters (A-Z), followed by a hyphen ("-")
107
+
- ends with five numbers (0-9), with no other characters before or after
111
108
112
109
Certain formats, such as the International Standard Book Number (ISBN-10) and the European Article Number (EAN-13), contain checksum digits and are self-validating.
2\. Register the class as a service using the `ibexa.product_catalog.attribute.symbol.checksum` tag and specify the format identifier using the `format` attribute.
124
116
125
-
use Ibexa\Contracts\ProductCatalog\Values\AttributeDefinitionInterface;
117
+
See below the example implementation of checksum validation using Luhn formula:
126
118
127
-
interface ChecksumInterface
128
-
{
129
-
public function validate(AttributeDefinitionInterface $attributeDefinition, string $value): bool;
0 commit comments