@skolisetti
1. Open your form -> Switch to classic mode

2.Choose the field you want to run the validation upon and double click and go to the Events Tab and click Add

Click New

Give your file a name, select JS and Then Select Text Editor

Below is a sample javascript function to validate against regular expression
function ValidateAgainstRegularExpression(executionContext) {
'use strict';
var formContext = executionContext.getFormContext();
var fieldText = formContext.getAttribute("FieldName").getValue();
if (fieldText === null) return;
if (!fieldText.match("^[0-9]*$")) {
formContext.getControl("FieldName").setNotification("Please enter only Numbers", 102);
return false;
}
else {
formContext.getControl(fieldName).clearNotification(102);
return true;
}
}
You need to replace the field name with the field name you are validating against and the above regular expression matches numbers.
File now should be added to the form as below:

Click on Add Event-> Add the function name and set pass execution parameter and click ok, Then save and publish your form

Hope this helps!