´àÀº °Í ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- https://github.com/AkiraKito/
´àÀº °Í ű×
´àÀº °Í ¼³¸í
Fivalid´Â Python.FeaturesData À¯È¿¼º °Ë»ç¿¡¼ ÀÛ¼ºµÈ °¡º¿î ÇÊµå µ¥ÀÌÅÍ À¯È¿¼º °Ë»ç : >>> FIVARID °¡Á® ¿À±â À¯È¿¼º °Ë»ç±â >>> NUM = validators.number (max = 20) >>> num (10) >>> num (21) " validators.invalidValueError : MaxData À¯È¿¼º °Ë»ç ¹× º¯È¯À» ÅëÇØ : >>>¿¡¼ Fivacid °¡Á® ¿À±â BaseField, À¯È¿¼º °Ë»ç±â, º¯È¯±â >>> Class PercentageField (BaseField) : ... Validator = Validators.All (... validators.number (min = 0, max = 100), ... validators.string ()) ... º¯È¯±â = converters.int_converter >>> Çʵå = percentagefield () >>> Çʵå ( '99') 99 >>> Çʵå ( '200') ÆĶöµå .validators.InvalidValueError : MaxStructured µ¥ÀÌÅÍ (¿¹ : Áßø µÈ Dict, Áßø ¸ñ·Ï) À¯È¿¼º °Ë»ç ¹× º¯È¯ : >>> From Fivalid.validators¿¡¼ Fivalid.validators¿¡¼ ¹®ÀÚ¿, ±æÀÌ, Àüü, Ç÷¡±× °¡Á® ¿À±â >>>¿¡¼ fivalid.converters infortvalue_converter °¡Á® ¿À±â >>> Ŭ·¡½º commentfielt (basefield) : ... validator = all (string (), ±æÀÌ (max = 500)) >>> Ŭ·¡½º NickNameField (BaseField) : ... À¯È¿¼º °Ë»ç±â = ¸ðµÎ (¹®ÀÚ¿ ( ), ±æÀÌ (ÃÖ´ë = 20. )) >>> Class EmptingMefield (BaseField) : ... Validator = Flag () ... º¯È¯±â = TruthValue_converter >>> ±ÔÄ¢ = dict (... { 'comment': commentfield (commentfield), ... '´Ð³×ÀÓ': NicknameField (), ... '±â¾ï': ±â¾ïÇϽʽÿÀ. ""stifiles = structuredFields (±ÔÄ¢) >>> stifiles ({ 'comment': 'Hello, Facial.', ... '´Ð³×ÀÓ': 'John Doe', ... '³ª¸¦ ±â¾ïÇϽʽÿÀ.': '1'} ...) { 'comment': u'hello, u'hello ','´Ð³×ÀÓ ': U'John Doe' , 'Àú ±â¾ï': true} Á¦Ç°ÀÇ È¨ÆäÀÌÁö
´àÀº °Í °ü·Ã ¼ÒÇÁÆ®¿þ¾î