# IsUSPhone

IsUSPhone (String str)

| **Name**    | ***IsUSPhone***                                                                                                                                                                               |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax      | IsUSPhone (String str)                                                                                                                                                                        |
| Purpose     | To return true if the number represents a valid US phone number.                                                                                                                              |
| Description | Checks whether a given value represents a valid United States phone number. This method tests format and digits to determine whether the given string is potentially a valid US phone number. |
| Return Type | Boolean                                                                                                                                                                                       |
| Parameter   | str \[System.String] – Value to be checked.                                                                                                                                                   |

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/ujm0PxHtv6ybCEyOfQdo/0.png)

**Example**

In this example, we will pass the required parameter to the function transformation object using a *Variables* object.

Where,

*str* = (123) 456-7890

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/6xGL4wjCl9smUmuVBigO/1.png)

In the output window, you can see that Astera has returned “True”, as the specified string matches a valid US phone format.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/LbTz5GVfx5kAqfUVoPQV/2.png)
