The CRVS ID Input Widget is a dynamic input component designed for capturing and validating identification numbers issued by Civil Registration and Vital Statistics (CRVS) systems.
This widget allows users to enter different types of identification documents (e.g., Child ID, Passport ID) with flexible validation rules like patterns, length, and format restrictions. It connects to backend CRVS services via configured endpoints to fetch and verify identity details, and can automatically populate other fields in the form with returned data. It is particularly useful in government service applications requiring official ID verification and data retrieval.
Complete JSON Object
{
"key":"InputKey",
"type":"customcrvsidinput",
"props":{
"label":"CRVS Data Fetch",
"required":true,
"allowedDocumentTypes":[
{
"value":"CHILDID",
"pattern":"^\\d*$",
"minLength":8
},
{
"value":"PASSPORTID",
"pattern":"^[a-zA-Z0-9]*$",
"minLength":5
}
],
"documentTypeKey":"DocumentTypeComponentKey",
"placeholder":"Enter identification number",
"useBaseUrl":true,
"endpointCode":"IGV3_FETCH_RECORD_TEST",
"populates":[
{
"valueKey":"data.name",
"targetKey":"OthernamerETQU"
},
{
"valueKey":"data.postNames",
"targetKey":"ForenameDuJmh"
}
]
},
"validation":{
"messages":{
"required":"Error message for `required`",
"invalidInput":"Error message for invalid input",
"invalidId":"Error message for failed response",
"pattern":"Error message for pattern"
}
}
}
Note: you can add an optional "populateRelativeToRootForm":true property in props to be able to populate fields in different blocks and section. Ensure to specify the full path for the targetKeye.g sectionkey.blockkey.fieldkey