Esempio n. 1
0
def validate_notice():
    validations = OrderedDict()
    validations['title'] = [check_required]
    validations['begin_show'] = [check_required, check_date]
    validations['end_show'] = [check_required, check_date]
    validations['body'] = [check_required]
    do_validate(request.form, validations)
Esempio n. 2
0
def validate_event():
    validations = OrderedDict()
    validations['name'] = [check_required]
    validations['date'] = [check_required, check_date]
    validations['loc'] = [check_required]
    validations['deadline'] = [check_date]
    validations['description'] = [check_required]
    do_validate(request.form, validations)
Esempio n. 3
0
def validate_practice():
    validations = OrderedDict()
    validations['date'] = [check_required, check_date]
    validations['begintime'] = [check_required, check_time]
    validations['endtime'] = [check_required, check_time]
    validations['loc'] = [check_required]
    validations['no'] = [check_multiple_number]
    do_validate(request.form, validations)
Esempio n. 4
0
def validate_game():
    validations = OrderedDict()
    validations['name'] = [check_required]
    validations['date'] = [check_required, check_date]
    validations['loc'] = [check_required]
    validations['genre'] = [check_required]
    validations['deadline'] = [check_date]
    validations['begin_acceptance'] = [check_time]
    validations['begin_game'] = [check_time]
    do_validate(request.form, validations)
Esempio n. 5
0
def validate_join_request():
    validators = {}
    validators['name'] = [check_required]
    validators['home'] = [check_required]
    validators['email'] = [check_required]
    validators['sex'] = [check_required, check_in(u'男性', u'女性')]
    validators['age'] = [check_required, check_in('18-20', '21-23', '24-26',
        '27-29', '30-32', '33-35', '36-38', '39-41', '42-')]
    validators['car'] = [check_required, check_in(u'あり', u'なし')]
    validators['has_racket'] = [check_required, check_in(u'あり', u'なし')]
    validators['holiday'] = [check_required, check_in(u'土日', u'日',
        u'不定期')]
    validators['experience'] = [check_required, check_in(u'初心者',
        u'初級', u'中級', u'上級', u'神、いわゆるゴッド')]
    validators['comment'] = [check_required]
    do_validate(request.form, validators)
Esempio n. 6
0
File: mobile.py Progetto: kzkn/fc
def validate_profile():
    validators = {}
    validators["birthday"] = [check_date]
    do_validate(request.form, validators)
Esempio n. 7
0
def validate_saying():
    validations = OrderedDict()
    validations['who'] = [check_required]
    validations['body'] = [check_required]
    do_validate(request.form, validations)
Esempio n. 8
0
def validate_member():
    validations = OrderedDict()
    validations['name'] = [check_required]
    validations['password'] = [check_number]
    validations['sex'] = [check_in(u'男性', u'女性')]
    do_validate(request.form, validations)
Esempio n. 9
0
def validate_report():
    validators = {}
    validators['title'] = [check_required]
    validators['description'] = [check_required]
    validators['body'] = [check_required]
    do_validate(request.form, validators)