2017 © Pedro Peláez
 

craft-plugin match-input

Craft field type for text fields that match a regex pattern

image

marionnewlevant/match-input

Craft field type for text fields that match a regex pattern

  • Thursday, June 21, 2018
  • by marionnewlevant
  • Repository
  • 1 Watchers
  • 1 Stars
  • 347 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 6 Versions
  • 22 % Grown

The README.md

Match Input plugin for Craft CMS 3.x

Craft field type for text fields that match a regex pattern., (*1)

Installation

To install Match Input, follow these steps:, (*2)

  1. Install with Composer via composer require marionnewlevant/match-input from your project directory
  2. Install plugin in the Craft Control Panel under Settings > Plugins

or, (*3)

  1. Install via the Plugin Store

Match Input works on Craft 3.x., (*4)

Match Input Overview

A Match Input field is a Plain Text field with the addition of a regex pattern that the field must match to be valid., (*5)

Using Match Input

When you create the field, you specify the Input Mask. This is the PCRE Pattern which the input is required to match. You also specify an Error Message to display when the field does not match the pattern., (*6)

If you need to translate the Error Message (for a multi-language control panel), those translations will be in the site translation category., (*7)

Sample Input Masks

  • https:// - not a valid pattern (no delimiters)
  • /https:\/\// - valid pattern, will match string with https:// in it anywhere
  • #https://# - valid pattern, will match string with https:// in it anywhere (sometimes / isn't the best delimiter)
  • #^https://# - will match string that begins with https://
  • /^\d{5}(-\d{4})?$/ - will match 5 digits, optionally followed by - and 4 digits (uses ^ and $ to match the entire string)

Acknowledgements

Brought to you by Marion Newlevant. Icon interior by SlideGenius from the Noun Project, (*8)

The Versions

21/06 2018

v2.x-dev

2.9999999.9999999.9999999-dev

Craft field type for text fields that match a regex pattern

  Sources   Download

MIT

The Requires

 

craftcms craft-plugin craft match-input match input

21/06 2018

2.0.1

2.0.1.0

Craft field type for text fields that match a regex pattern

  Sources   Download

MIT

craftcms craft-plugin craft match input

22/10 2017

2.0.0

2.0.0.0

Craft field type for text fields that match a regex pattern

  Sources   Download

MIT

The Requires

 

craftcms craft-plugin craft match-input

24/03 2017

dev-master

9999999-dev

Craft field type for text fields that match a regex pattern

  Sources   Download

MIT

craftcms craft-plugin craft matchinput

24/03 2017

1.0.1

1.0.1.0

Craft field type for text fields that match a regex pattern

  Sources   Download

MIT

craftcms craft-plugin craft matchinput

19/02 2017

1.0.0

1.0.0.0

Craft field type for text fields that match a regex pattern

  Sources   Download

MIT

craftcms craft-plugin craft matchinput