Skip to content

Instantly share code, notes, and snippets.

View rodgomesc's full-sized avatar
🎯
Focusing

Rodrigo Gomes rodgomesc

🎯
Focusing
View GitHub Profile

MacOS

Download from here:

http://d.pr/f/QE3d

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@rodgomesc
rodgomesc / maskedinput.py
Last active August 29, 2015 14:26 — forked from MaxMorais/maskedinput.py
Web2py MaskedInput Widget
# This widget requires jQuery-iMask to run
#https://github.com/cwolves/jQuery-iMask
from gluon.dal import Field
import re
def factory(mask='', auto_start=True, empty_chr="_", error_message="Did not match!"):
assert len(mask)>1, 'empty mask not is allowed'
assert len(empty_chr)==1, 'empty_chr requires one character'
from gluon.sqlhtml import StringWidget
from gluon.validators import IS_MATCH, IS_NOT_EMPTY