- Issue created by @Panchuk
- Assigned to riabovol
- @riabovol opened merge request.
- πΊπ¦Ukraine Panchuk Volyn, Lutsk
A good example of the entity constraint implementation https://www.drupal.org/docs/drupal-apis/entity-api/entity-validation-api... β
- πΊπ¦Ukraine Panchuk Volyn, Lutsk
@riabovol here an example of validation with good regexp
$styles = ".in_circle|Tes\r\n.in-circle|tes12\r\n.incircle|as12\r\n.in_circle|In Circle\r\n.bordered|With Borders\r\n.some-example|SomeExample\r\n123text|123Test\r\n\sad|\Sad\r\n.some_class*|someclass\r\n"; $styles = str_replace(["\r\n", "\r"], "\n", $styles); foreach (explode("\n", $styles) as $style) { $style = trim($style); // Validate syntax: [.class...]|label pattern expected. if (!preg_match('@^ *(\\.[_a-zA-Z]+[a-zA-Z0-9_-]+ *)*\\| *.+ *$@', $style)) { return FALSE; } // Parse. [$selector, $label] = explode('|', $style); $configured_style = [ 'name' => trim($label), 'class' => trim($selector), ]; }
- @riabovol opened merge request.
- Status changed to Needs review
over 1 year ago 10:07am 25 February 2023 -
Panchuk β
committed c1e217f6 on 1.0.x authored by
riabovol β
Issue #3339642 by riabovol, Panchuk: Configurations off-canvas: styles...
-
Panchuk β
committed c1e217f6 on 1.0.x authored by
riabovol β
- πΊπ¦Ukraine Panchuk Volyn, Lutsk
MR looks fine, merging it into the dev branch.
- Issue was unassigned.
- Status changed to Fixed
over 1 year ago 10:11am 26 February 2023 Automatically closed - issue fixed for 2 weeks with no activity.