In case you are adding the new input via your own code, as eComLabs has correctly stated, for and id should match. Also in the script, you need to replace the text elm_id with actual element ID, in your case it has to be xx.
In case you will add the new profile field using built-in tools, you may need to make additional changes in the design/themes/responsive/templates/views/profiles/components/profile_fields.tpl template. To be more specific, you can use the hook profiles:profile_fieldsprofiles:profile_fields to override it where you need to make changes to the default code where label element is defined:
{$field.description}In a way, that the cm-regexp class will be added to the profile field, which requires validation.
thanks for your reply,,,
i found the hook ,,,,
{hook name="profiles:profile_fields"}{if ($pref_field_name != $field.description || $required == "Y") && $field.field_type != "ProfileFieldTypes::VENDOR_TERMS"|enum} {$field.description} {/if}{if $field.field_type == "ProfileFieldTypes::STATE"|enum} {$_country = $profile_data.s_country} {$_state = $value} {elseif $field.field_type == "ProfileFieldTypes::COUNTRY"|enum} {$_country = $value}
{$field.description}
the field i want to validate is an input type filed (i added it from ADMINSTARTION > PROFILE FIELD > CONTACT INFORMATION >
an i set the filed code to trxID
what should i add or replace to the above label code to use this expression ^\d{11}$ so that it can only accept 11 numbers as i mentioned above