Metadata-Version: 1.0
Name: sqlalchemy_elixir_validations
Version: 0.1.1
Summary: Simple model validations for Elixir and Sqlalchemy
Home-page: http://www.bitbucket.org/radaczynski/sqlalchemy_elixir_validations
Author: Leandro Lameiro & Bartosz Radaczynski
Author-email: lameiro@gmail.com
License: MIT
Description: 
        SQLAlchemy and Elixir validations
        =================================
        
        Provide a set of simple yet useful validations for the models:
        Sqlalchemy:
        -----------
        from sqlalchemy_validations import *
        people_table = Table(....)
        class Person(object)
        pass
        
        mapper(Person, people_table,
        extension=[Validator(
        range_of('age', 0, 150),
        format_of('phone', re.compile(r'\d{4}-?\d{4}'))
        numericality_of('foo','bar','some_next_field')
        )
        ]
        )
        
        Elixir:
        -------
        from elixir_validations import *
        class Person(Entity):
        username=Field(Unicode(30),nullable=False,index=True)
        email=Field(Unicode,nullable=False)
        age=Field(Integer,nullable=False)
        
        validates_uniqueness_of('username')
        validates_presence_of('username', 'email')
        validates_format_of('email',re.compile("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])"))
        validates_numericality_of('age',integer_only = True)
        
        
Keywords: sqlalchemy elixir validations
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
