Phone number must be 10 digits minimum and mandatory !
How can we do it ?
hi,
for version 4.x:
- go to menu “Administration” → “Profile fields” and set field as mandatory
- minimal phone length is already set as 10 so please make sure that in settings of your phone field (see point #1) class “cm-phone” is used
best regards,
WSA team
We need to setup minimum and mandatory on call requests.
design\themes\YOUR_THEME\templates\addons\call_requests\views\call_requests\components\call_requests_content.tpl
Please replace:
with
Regular experssion for the phone format can be edited in js\tygh\core.js file:
var regexp = /^[\s()+-]*([0-9][\s()+-]*){6,20}$/;
And do not forget to clear cache
I changed the Phone mask in the addon's settings (Add-ons>Manage Add-ons>Call Requests) so that the validation matches US phone number format, which means I set mine to (999) 999-9999. The phone number appears to be required by default, but that doesn't prevent a user from just entering ONE character in the field and submitting the form.
In the above example of the regular expression, wouldn't I just change {6,20} to {10,20} to require a minimum of 10 characters for all phone number fields?
[quote name='Magpie Don' timestamp='1433532390' post='217558']
In the above example of the regular expression, wouldn't I just change {6,20} to {10,20} to require a minimum of 10 characters for all phone number fields?
[/quote]
You can always try and inform us about the result. But please note that this regular expression works with the default cm-phone class only