Normalizes a DOB string from any upstream source (DigiLocker sends
unpadded "10-9-2026" or "2026-9-10") into the "dd/mm/yyyy" format the
date picker produces, so prefilled and picked values look consistent.
True when the pii field is a date of birth, so it should get a date
picker instead of free text. Matched either by label name (e.g. "DOB",
"Date of Birth") or by the API's regex_pattern looking date-shaped
(dd-mm-yyyy), since the label alone isn't always reliable.
Undoes the "+91" prefix a value may already carry, for a field that
renders its own separate "+91" chip. For a phone label that stops it
showing twice; for any other label ("+91user@mail.com") the prefix is
junk a caller attached, and is dropped rather than displayed or sent.
Drops a "+91" that can't belong to the value, judged on shape alone —
used before the pii label names are known. What follows a real country
code is all digits, so "+91user@mail.com" is stripped while
"+919891737651" is left intact.
Applies table header colours to <th> tags in html. The colours are
appended to each tag's inline style because inline styles beat
HtmlWidget.customStylesBuilder, and the API's own th styles would win.
True when the pii label names a phone-like identity, so the field gets a
"+91" chip and its value the matching prefix. Matched case-insensitively
— labels come from customer configuration ("Mobile Number", "phone no").
Prefixes "+91" using only the shape of the value, for the case where the
PII label name isn't known yet (the first display call goes out before
the form config that names the identity types comes back). Anything that
doesn't look like a bare Indian mobile is left untouched.