/
ARC: UI spec documentation

This page is created to document the UI spec of Android Registration Client.


Document reference link: https://docs.mosip.io/1.2.0/modules/registration-client/registration-client-ui-specifications

Registration Client UI Specifications

Overview

The registration UI forms are rendered using respective UI specification JSON. This is derived from the ID Schema defined by a country. Here, we would be discussing about the properties used in the UI specification of Registration Client.

In the Registration Client, currently, Registration Tasks(process) forms are configurable using the UI specifications.

Each process has multiple screens and each screen is rendered with one or more fields.


Process/ Task spec JSON template

1{ 2 "id": "<NEW/UPDATE/LOST/BIOMETRIC_CORRECTION process name as passed in the packet>", 3 //order in which the process is displayed on the registration client home screen 4 "order": 1, 5 "flow": "<NEW/UPDATE/LOST/CORRECTION>", 6 //Multi-lingual labels displayed based on the logged in language 7 "label": { 8 "eng": "Registration", 9 "ara": "تسجيل", 10 "fra": "Inscription" 11 }, 12 //screen details - follows screen spec structure 13 "screens": [ 14 {} 15 ], 16 //caption displays on-hover content 17 "caption": { 18 "eng": "Registration", 19 "ara": "تسجيل", 20 "fra": "Inscription" 21 }, 22 //icon is the symbol that appears before the process label 23 "icon": "registration.png", 24 "isActive": true, 25 //group names that should be by default selected during UDPATE UIN process 26 "autoSelectedGroups": [ 27 "" 28 ] 29}


Screen spec JSON template

1 //Order of the screen in registration page 2 "order": 1, 3 "name": "<unique identifier for the screen>", 4 "label": { 5 "ara": "شاشة عينة", 6 "fra": "Exemple d'écran", 7 "eng": "Sample screen" 8 }, 9 "caption": { 10 "ara": "شاشة عينة", 11 "fra": "Exemple d'écran", 12 "eng": "Sample screen" 13 }, 14 //field details - follows field spec structure 15 "fields": [ 16 {} 17 ], 18 "layoutTemplate": null, 19 //displays field to provide pre-reg application ID, data fetched from pre-reg application will be pre-filled in the current registration form 20 "preRegFetchRequired": true, 21 //enable below flag to capture additionalInfo request ID , applicable only during correction process 22 "additionalInfoRequestIdRequired": false, 23 //show or hide screens 24 "active": true 25}

Field spec JSON template

1{ 2 "id": "<Unique identifier for the field, must be same as that described in the ID Schema>", 3 //inputRequired is used to identify if UI input is needed or not 4 "inputRequired": true, 5 //type defines the datatype of the field, must be same as that is defined in the ID Schema 6 "type": "<string/simpleType/documentType/biometricsType>", 7 "controlType": "textbox/fileupload/dropdown/checkbox/button/date/ageDate/html/biometrics", 8 //minimum- applicable only for date controlType(defined in days) 9 "minimum": 0, 10 //maximum- applicable only for date controlType(defined in days) 11 "maximum": 365, 12 "description": "<Field description>", 13 "label": { 14 "ara": "حقل العينة", 15 "fra": "Exemple de champ", 16 "eng": "Sample Field" 17 }, 18 //fieldType is used to identify if it is a dynamic field 19 "fieldType": "<default/dynamic>", 20 //to validate the format should be in upper or lower case 21 "format": "<lowercase/uppercase/none>", 22 //list of validators for the field 23 "validators": [ 24 { 25 //type of validation engine (currently, only regex is supported) 26 "type": "regex", 27 //expression for the validation 28 "validator": "^([0-9]{10,30})$", 29 //list of arguments needed for the validator 30 "arguments": [], 31 //if null, its applicable for all languages, else validator expression can be provided for each langCode 32 "langCode": null, 33 /*error code to be used to display specific error message, if null, generic validation error message is displayed 34 There error codes must be configured in registration client i18n files*/ 35 "errorCode": "UI_100001" 36 } 37 ], 38 //determines sharing and longevity policies applicable as defined in ID Schema 39 "fieldCategory": "<pvt/evidence/kyc>", 40 "alignmentGroup": "<fields belonging to same alignment group are placed horizontally next to each other>", 41 //determines when to display and hide the field(set null if the field has to be displayed always) 42 "visible": { 43 "engine": "MVEL", 44 "expr": "identity.get('ageGroup') == 'INFANT' && (identity.get('introducerRID') == nil || identity.get('introducerRID') == empty)" 45 }, 46 "contactType": null, 47 //used to group together the list of fields(only applicable in the Update UIN process) 48 "group": "<grouping used in update UIN process>", 49 "groupLabel": { 50 "eng": "Sample group", 51 "ara": "مجموعة العينة", 52 "fra": "Groupe d'échantillons" 53 }, 54 /*on change of the field value, configured Action will be triggered on other fields 55 Change action handlers should be implemented in registration client*/ 56 "changeAction": null, 57 //enable or disable auto-transliteration 58 "transliterate": false, 59 /*provide the templateName(applicable only for html controlType fields) 60 These templates should be configured in templates table*/ 61 "templateName": null, 62 "fieldLayout": null, 63 "locationHierarchy": null, 64 //On any biometric exception, Need to capture exception photo as proof if the below flag is enabled 65 "exceptionPhotoRequired": true, 66 /*applicable only for BiometricsType field, defines the list of attributes to be captured 67 All the supported biometric attributes are listed down for reference*/ 68 "bioAttributes": [ 69 "leftEye", 70 "rightEye", 71 "rightIndex", 72 "rightLittle", 73 "rightRing", 74 "rightMiddle", 75 "leftIndex", 76 "leftLittle", 77 "leftRing", 78 "leftMiddle", 79 "leftThumb", 80 "rightThumb", 81 "face" 82 ], 83 //capture of above mentioned bioAttributes can be conditionally mandated based on age group 84 "conditionalBioAttributes": [ 85 { 86 "ageGroup": "INFANT", 87 "process": "ALL", 88 "validationExpr": "face || (leftEye && rightEye)", 89 "bioAttributes": [ 90 "face", 91 "leftEye", 92 "rightEye" 93 ] 94 } 95 ], 96 //set true/false to mark the field as mandatory or optional 97 "required": true, 98 //if requiredOn is defined, the evaluation result of requiredOn.expr takes the priority over "required" attribute 99 "requiredOn": [ 100 { 101 "engine": "MVEL", 102 "expr": "identity.get('ageGroup') == 'INFANT' && (identity.get('introducerRID') == nil || identity.get('introducerRID') == empty)" 103 } 104 ], 105 //used to identify the type of field 106 "subType": "<document types / applicant / heirarchy level names>" 107}

Sample correction process SPEC: Biometric Correction

1{ 2 "id": "BIOMETRIC_CORRECTION", 3 "order": 4, 4 "flow": "CORRECTION" 5 "label": { 6 "eng": "Biometric correction", 7 "ara": "التصحيح البيومتري", 8 "fra": "Correction biométrique" 9 }, 10 "screens": [ 11 { 12 "order": 1, 13 "name": "consentdet", 14 "label": { 15 "ara": "موافقة", 16 "fra": "Consentement", 17 "eng": "Consent" 18 }, 19 "caption": { 20 "ara": "موافقة", 21 "fra": "Consentement", 22 "eng": "Consent" 23 }, 24 "fields": [ 25 { 26 "id": "consentText", 27 "inputRequired": true, 28 "type": "simpleType", 29 "minimum": 0, 30 "maximum": 0, 31 "description": "Consent", 32 "label": {}, 33 "controlType": "html", 34 "fieldType": "default", 35 "format": "none", 36 "validators": [], 37 "fieldCategory": "evidence", 38 "alignmentGroup": null, 39 "visible": null, 40 "contactType": null, 41 "group": "consentText", 42 "groupLabel": null, 43 "changeAction": null, 44 "transliterate": false, 45 "templateName": "Registration Consent", 46 "fieldLayout": null, 47 "locationHierarchy": null, 48 "conditionalBioAttributes": null, 49 "required": true, 50 "bioAttributes": null, 51 "requiredOn": [], 52 "subType": "consentText" 53 }, 54 { 55 "id": "consent", 56 "inputRequired": true, 57 "type": "string", 58 "minimum": 0, 59 "maximum": 0, 60 "description": "consent accepted", 61 "label": { 62 "ara": "الاسم الكامل الكامل الكامل", 63 "fra": "J'ai lu et j'accepte les termes et conditions pour partager mes PII", 64 "eng": "I have read and accept terms and conditions to share my PII" 65 }, 66 "controlType": "checkbox", 67 "fieldType": "default", 68 "format": "none", 69 "validators": [], 70 "fieldCategory": "evidence", 71 "alignmentGroup": null, 72 "visible": null, 73 "contactType": null, 74 "group": "consent", 75 "groupLabel": null, 76 "changeAction": null, 77 "transliterate": false, 78 "templateName": null, 79 "fieldLayout": null, 80 "locationHierarchy": null, 81 "conditionalBioAttributes": null, 82 "required": true, 83 "bioAttributes": null, 84 "requiredOn": [], 85 "subType": "consent" 86 }, 87 { 88 "id": "preferredLang", 89 "inputRequired": true, 90 "type": "string", 91 "minimum": 0, 92 "maximum": 0, 93 "description": "user preferred Language", 94 "label": { 95 "ara": "لغة الإخطار", 96 "fra": "Langue de notification", 97 "eng": "Notification Langauge" 98 }, 99 "controlType": "button", 100 "fieldType": "dynamic", 101 "format": "none", 102 "validators": [], 103 "fieldCategory": "pvt", 104 "alignmentGroup": "group1", 105 "visible": null, 106 "contactType": null, 107 "group": "PreferredLanguage", 108 "groupLabel": null, 109 "changeAction": null, 110 "transliterate": false, 111 "templateName": null, 112 "fieldLayout": null, 113 "locationHierarchy": null, 114 "conditionalBioAttributes": null, 115 "required": true, 116 "bioAttributes": null, 117 "requiredOn": [], 118 "subType": "preferredLang" 119 } 120 ], 121 "layoutTemplate": null, 122 "preRegFetchRequired": false, 123 "additionalInfoRequestIdRequired": false, 124 "active": false 125 }, 126 { 127 "order": 2, 128 "name": "BiometricDetails", 129 "label": { 130 "ara": "التفاصيل البيومترية", 131 "fra": "Détails biométriques", 132 "eng": "Biometric Details" 133 }, 134 "caption": { 135 "ara": "التفاصيل البيومترية", 136 "fra": "Détails biométriques", 137 "eng": "Biometric Details" 138 }, 139 "fields": [ 140 { 141 "id": "individualBiometrics", 142 "inputRequired": true, 143 "type": "biometricsType", 144 "minimum": 0, 145 "maximum": 0, 146 "description": "", 147 "label": { 148 "ara": "القياسات الحيوية الفردية", 149 "fra": "Applicant Biometrics", 150 "eng": "Applicant Biometrics" 151 }, 152 "controlType": "biometrics", 153 "fieldType": "default", 154 "format": "none", 155 "validators": [], 156 "fieldCategory": "pvt", 157 "alignmentGroup": null, 158 "visible": null, 159 "contactType": null, 160 "group": "Biometrics", 161 "groupLabel": null, 162 "changeAction": null, 163 "transliterate": false, 164 "templateName": null, 165 "fieldLayout": null, 166 "locationHierarchy": null, 167 "conditionalBioAttributes": [ 168 { 169 "ageGroup": "INFANT", 170 "process": "ALL", 171 "validationExpr": "face", 172 "bioAttributes": [ 173 "face" 174 ] 175 } 176 ], 177 "required": true, 178 "bioAttributes": [ 179 "leftEye", 180 "rightEye", 181 "rightIndex", 182 "rightLittle", 183 "rightRing", 184 "rightMiddle", 185 "leftIndex", 186 "leftLittle", 187 "leftRing", 188 "leftMiddle", 189 "leftThumb", 190 "rightThumb", 191 "face" 192 ], 193 "requiredOn": [], 194 "subType": "applicant" 195 }, 196 { 197 "id": "proofOfException", 198 "inputRequired": false, 199 "type": "documentType", 200 "minimum": 0, 201 "maximum": 0, 202 "description": "proofOfException", 203 "label": { 204 "ara": "إثبات الاستثناء", 205 "fra": "Exception Proof", 206 "eng": "Exception Proof" 207 }, 208 "controlType": "fileupload", 209 "fieldType": "default", 210 "format": "none", 211 "validators": [], 212 "fieldCategory": "evidence", 213 "alignmentGroup": null, 214 "visible": null, 215 "contactType": null, 216 "group": "Documents", 217 "groupLabel": null, 218 "changeAction": null, 219 "transliterate": false, 220 "templateName": null, 221 "fieldLayout": null, 222 "locationHierarchy": null, 223 "conditionalBioAttributes": null, 224 "required": false, 225 "bioAttributes": null, 226 "requiredOn": [], 227 "subType": "POE" 228 } 229 ], 230 "layoutTemplate": null, 231 "preRegFetchRequired": false, 232 "additionalInfoRequestIdRequired": true, 233 "active": false 234 } 235 ], 236 "caption": { 237 "eng": "Biometric correction", 238 "ara": "التصحيح البيومتري", 239 "fra": "Correction biométrique" 240 }, 241 "icon": "UINUpdate.png", 242 "isActive": true, 243 "autoSelectedGroups": null 244}