you need to play with regexes.....
assuming "parenthesis-3 digits-parenthesis-space-3 digits-hypen-4
digits" sequence
requires = IS_MATCH('\([\d]{3}\) [\d]{3}-[\d]{4}',
error_message='please enter phone number in format (800)
555-1212')
should do it.
On Jun 23, 9:50 pm, "David J." <[email protected]> wrote:
> I need help trying to create a custom widget;
>
> I want to create a phone-number widget
>
> I want it to only accept text in (800) 555-1212
>
> I am not sure how to do this.
>
> Any ideas would be greatly appreciated.