Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
factor_sms\helper Class Reference

Static Public Member Functions

static format_number (string $phonenumber)
 This function internationalises a number to E.164 standard.
 
static is_valid_phonenumber (string $phonenumber)
 Validate phone number with E.164 format.
 

Member Function Documentation

◆ format_number()

static factor_sms\helper::format_number ( string $phonenumber)
static

This function internationalises a number to E.164 standard.

https://46elks.com/kb/e164

Parameters
string$phonenumberthe phone number to format.
Return values
stringthe formatted phone number.

◆ is_valid_phonenumber()

static factor_sms\helper::is_valid_phonenumber ( string $phonenumber)
static

Validate phone number with E.164 format.

https://en.wikipedia.org/wiki/E.164

Parameters
string$phonenumberfrom the given user input
Return values
bool

The documentation for this class was generated from the following file: