Moodle Plugins directory: Short text with regex validation: Versions: 1.0.1 | Moodle.org
Short text with regex validation
Short text with regex validation 1.0.1
Moodle Shorttext customfield with regex validation
Textregex customfield plugin allows to have a short text input field with regex validation. Enabling to ensure a valid format of the field data.
Setting up the field
A Perl-compatible regular expression is used to validate the user input. Regex can be defined during the creation of the field itself, e.g., a course custom field. Because the regex definition might be challenging, we recommend using this plugin only if you can restrict the new field definitions to expert users. The plugin performs a regex validation on the server side when saving the field. Please add a detailed description for the field that explains the rules in a human-readable form, as most of the users will not understand the regex and, therefore, will be unable to correct their input unless you have a good description. For multi-language sites, currently, the only way to provide a translated description is to use a multilang filter on the site and provide a description in all used languages in the description field.
Entering data to a field
Once the field is defined, users can use it like a regular text field. Enter data and store it. If the entered value does not match the regex, input will not be accepted, and the user will receive a standard notification, including the regex. Field data validation is performed on both the server and client sides.
Version information
- Version build number
- 2024052300
- Version release name
- 1.0.1
- Maturity
- Стабилна версия
- MD5 Sum
- fd92c183e1bed5d3146cc45548db0e5a
- Supported software
- Moodle 3.11, Moodle 4.0, Moodle 4.1, Moodle 4.2, Moodle 4.3, Moodle 4.4
- The more recent release 1.1.1 (2025041400) exists for Moodle 3.11
- The more recent release 1.1.1 (2025041400) exists for Moodle 4.0
- The more recent release 1.1.1 (2025041400) exists for Moodle 4.1
- The more recent release 1.1.1 (2025041400) exists for Moodle 4.2
- The more recent release 1.1.1 (2025041400) exists for Moodle 4.3
- The more recent release 1.1.1 (2025041400) exists for Moodle 4.4
Version control information
- Version control system (VCS)
- GIT
- VCS repository URL
- VCS tag
- v1.0.1