public/wordpress/wp-content/plugins/wp-courseware/includes/functions/validation.php
/**
 * Validates a phone number using a regular expression.
 *
 * @since 4.3.0
 *
 * @param string $phone Phone number to validate.
 *
 * @return bool
 */
Validates a phone number using a regular expression.

@param string $phone Phone number to validate.

@return bool
Validates a phone number using a regular expression . @param string $phone Phone number to validate . @return bool
function wpcw_validation_is_phone( $phone ) {
	if ( 0 < strlen( trim( preg_replace( '/[\s\#0-9_\-\+\/\(\)]/', '', $phone ) ) ) ) {
		return false;
	}
	return true;
}
function wpcw_validation_is_phone ( $ phone ) { if ( 0 < strlen ( trim ( preg_replace ( '/[\s\#0-9_\-\+\/\(\)]/' , '' , $ phone ) ) ) ) { return false ; } return true ; }
Validates a phone number using a regular expression.
Validates a phone number using a regular expression .