PHP 클래스 WC_Validation

저자: WooThemes
파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

공개 메소드들

메소드 설명
format_phone ( mixed $tel ) : string format_phone function.
format_postcode ( $postcode, $country ) : string Format the postcode according to the country and length of the postcode.
is_GB_postcode ( string $to_check ) : boolean Check if is a GB postcode.
is_email ( $email ) : boolean Validates an email using wordpress native is_email function.
is_phone ( $phone ) : boolean Validates a phone number using a regular expression.
is_postcode ( $postcode, $country ) : boolean Checks for a valid postcode.

메소드 상세

format_phone() 공개 정적인 메소드

format_phone function.
public static format_phone ( mixed $tel ) : string
$tel mixed
리턴 string

format_postcode() 공개 정적인 메소드

Format the postcode according to the country and length of the postcode.
public static format_postcode ( $postcode, $country ) : string
리턴 string formatted postcode

is_GB_postcode() 공개 정적인 메소드

Check if is a GB postcode.
저자: John Gardner
public static is_GB_postcode ( string $to_check ) : boolean
$to_check string A postcode
리턴 boolean

is_email() 공개 정적인 메소드

Validates an email using wordpress native is_email function.
public static is_email ( $email ) : boolean
리턴 boolean

is_phone() 공개 정적인 메소드

Validates a phone number using a regular expression.
public static is_phone ( $phone ) : boolean
리턴 boolean

is_postcode() 공개 정적인 메소드

Checks for a valid postcode.
public static is_postcode ( $postcode, $country ) : boolean
리턴 boolean