diff --git a/app/components/ClinicUserEdit.js b/app/components/ClinicUserEdit.js
index e1145d488..276ffb3d1 100644
--- a/app/components/ClinicUserEdit.js
+++ b/app/components/ClinicUserEdit.js
@@ -52,6 +52,36 @@ function validateForm(values, props){
if(mrnRequired && !values.mrn){
errors.mrn = i18n.t('Patient\'s MRN is required');
}
+ // mrn needs to be uppercase alphanumeric between 6 and 25 characters
+ if(values.mrn && !/^[A-Z0-9]{6,25}$/.test(values.mrn)){
+ errors.mrn = (
+
diff --git a/app/containers/ClinicUserEditPage.js b/app/containers/ClinicUserEditPage.js
index 6d50d7666..8d66cfc39 100644
--- a/app/containers/ClinicUserEditPage.js
+++ b/app/containers/ClinicUserEditPage.js
@@ -36,30 +36,46 @@ export class ClinicUserEditPage extends Component {
};
render() {
- const { allUsers, uploadTargetUser, memberships } = this.props;
+ const {
+ allUsers,
+ uploadTargetUser,
+ memberships,
+ loggedInUser,
+ createCustodialAccountErrorMessage,
+ createCustodialAccountErrorDismissed,
+ updateProfileErrorMessage,
+ updateProfileErrorDismissed,
+ selectedClinicId,
+ clinics,
+ working,
+ async,
+ sync
+ } = this.props;
+
return (
+ createCustodialAccountErrorMessage={createCustodialAccountErrorMessage}
+ createCustodialAccountErrorDismissed={createCustodialAccountErrorDismissed}
+ updateProfileErrorMessage={updateProfileErrorMessage}
+ updateProfileErrorDismissed={updateProfileErrorDismissed}
+ dismissCreateCustodialAccountError={sync.dismissCreateCustodialAccountError}
+ dismissUpdateProfileError={sync.dismissUpdateProfileError}
+ onSubmitFail={sync.clinicInvalidDate}
+ selectedClinicId={selectedClinicId}
+ clinics={clinics}
+ working={working}
+ acknowledgeNotification={sync.acknowledgeNotification}
+ fetchPatientsForClinic={async.fetchPatientsForClinic} />
);
}
diff --git a/app/package.json b/app/package.json
index 53e21a984..e6a354a56 100644
--- a/app/package.json
+++ b/app/package.json
@@ -1,7 +1,7 @@
{
"name": "tidepool-uploader",
"productName": "tidepool-uploader",
- "version": "2.55.1-tandem-compatibility.updates.1",
+ "version": "2.55.1-mrn-validation.2",
"description": "Tidepool Project Universal Uploader",
"main": "./main.prod.js",
"author": {
diff --git a/package.json b/package.json
index f85201ed2..b4a35e18c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "tidepool-uploader",
- "version": "2.55.1-tandem-compatibility.updates.1",
+ "version": "2.55.1-mrn-validation.2",
"description": "Tidepool Project Universal Uploader",
"private": true,
"main": "main.prod.js",
diff --git a/styles/components/ClinicUserEdit.module.less b/styles/components/ClinicUserEdit.module.less
index f9fbd64a5..fdeefaecc 100644
--- a/styles/components/ClinicUserEdit.module.less
+++ b/styles/components/ClinicUserEdit.module.less
@@ -126,6 +126,11 @@
.validationError {
color: @red-error;
margin-top: 10px;
+
+ ul {
+ padding-left: 20px;
+ margin-top: 0px;
+ }
}
.iconClose {