Skip to content

Instantly share code, notes, and snippets.

View PodClay's full-sized avatar

Clay Ravin PodClay

  • Red Galleon
  • Melbourne, Australia
View GitHub Profile
@Prithvirajbilla
Prithvirajbilla / index.html
Created May 21, 2013 14:34
A CodePen by PrithvirajBilla. Shape Shifter - A canvas experiment
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0">
<title>Shape Shifter</title>
<link rel="stylesheet" href="styles/normalize.css" >
<link rel="stylesheet" href="styles/style.css" >
</head>
@BruceMcKinnon
BruceMcKinnon / functions.php
Last active September 9, 2022 03:54
Gravity Forms Australian phone number validation mask
add_filter( 'gform_phone_formats', 'au_phone_format' );
function au_phone_format( $phone_formats ) {
$phone_formats['au'] = array(
'label' => 'Australia',
'mask' => '99 9999 9999',
'regex' => '/^\({0,1}((0|\+61)(2|4|3|7|8)){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3}$/',
'instruction' => 'Australian phone numbers.',
);
return $phone_formats;