Skip to content

REDCap EM to add and remove system wide validation types

License

Notifications You must be signed in to change notification settings

uwctri/AddValidationTypes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AddValidationTypes - Redcap External Module

What does it do?

This module allows you to add and remove custom validation types via the Control Center's "Field Validation Types" page. The new validation types act just like all other native validation types; that means they are hard stops, work on data loads, and can be disable (but still usable via a data dictionary upload).

Installing

You can install the module from the REDCap EM repo or drop it directly in your modules folder (i.e. redcap/modules/add_validation_types_v1.0.0).

Setting up a new validation type

Validation types require a display name, a unique internal name, and two regular expressions that can be used to perform validation on fields. Sites like Regexr can be used to design and easily test both JS and PCRE (PHP) regex. As of 2018 their are not many differences between JS and PCRE regex, but their are many sites that explain, in painful detail, any discrepancies. Unless you are using exotic features, you will likely be able to simply test and verify your one pattern works as expected for both PHP and JS.