0

I'm using the Redux Framework to build a theme options panel for a Wordpress theme.

I'd like to allow my users to enter their phone number as a validated text field so I can incorporate it around the site.

I've checked the docs, and its looks like I can write my own custom validation.

I tried adding the HTML5 attribute type="tel" to the input field without success.

Googling turns up no results.

I did find this post on using regex for phone # validation.

Has anyone used Redux Framework and incorporated phone # validation?

Community
  • 1
  • 1
Ken Prince
  • 1,437
  • 1
  • 20
  • 26
  • You would have to make your own custom validation or enqueue javascript to do the job. It wouldn't be hard to do though... – Dovy Jun 09 '14 at 06:30

1 Answers1

0

It would be hard to do. You'd just need to make your own custom validation class.

Take any of the Redux validation classes: https://github.com/ReduxFramework/redux-framework/blob/master/ReduxCore/inc/validation/numeric/validation_numeric.php

Change the class name. Include it in your code BEFORE you run Redux, and add the validation.

When it's working, submit a pull request and we'll put it in the Redux core. :)

Dovy
  • 1,278
  • 10
  • 19