The <salla-tel-input>
web component is used to show a field for entering a telephone number, with country key/code prefix, and that can be customized using the properties' parameters available.Example#
Usage#
Properties#
Property | Attribute | Description | Type | Default |
---|
Country Code | country-code | Current country code | string | 'salla.config.get('user.country_code', 'SA')' |
Name | name | Input name value | string | `` |
Phone | phone | Current phone number | string | undefined |
Events#
Event | Description | Type |
---|
phoneEntered | This event will be fired when the user enters the telephone input field | CustomEvent<Phone> |
Methods#
The pre-defined methods
allow for calling functions built by Salla to carry out certain actvities, suh as getValues
to fetch the inputted values, and isValid
to determine whether or not the values are valid.Method | Description | Return Type |
---|
getValues() | Gets current inputted values | Promise<{[x: string]: string; countryCode: string; }> |
isValid() | Shows the validity of the current inputted values | Promise<boolean> |

扫码加入 Apifox 微信交流群
在这里,获得 Apifox 使用上的任何帮助,快速上手让你的研测效率得到大幅提升

扫码加入交流群Modified at 2025-02-20 07:53:20