#NEWLINE# def get_min_max_length_errors( self ) : #NEWLINE# #INDENT# errors = [ ] #NEWLINE# if getattr ( self , 'min_length' , None ) : #NEWLINE# #INDENT# self . widget . attrs [ 'ng-minlength' ] = self . min_length #NEWLINE# #UNINDENT# if getattr ( self , 'max_length' , None ) : #NEWLINE# #INDENT# self . widget . attrs [ 'ng-maxlength' ] = self . max_length #NEWLINE# #UNINDENT# for item in self . validators : #NEWLINE# #INDENT# if ( getattr ( item , 'code' , None ) == 'min_length' ) : #NEWLINE# #INDENT# message = ungettext_lazy ( 'Ensure this value has at least %(limit_value)d character' , 'Ensure this value has at least %(limit_value)d characters' , 'limit_value' ) #NEWLINE# errors . append ( ( '$error.minlength' , ( message % { #NEWLINE# #INDENT# 'limit_value' : self . min_length , #NEWLINE# #UNINDENT# } ) ) ) #NEWLINE# #UNINDENT# if ( getattr ( item , 'code' , None ) == 'max_length' ) : #NEWLINE# #INDENT# message = ungettext_lazy ( 'Ensure this value has at most %(limit_value)d character' , 'Ensure this value has at most %(limit_value)d characters' , 'limit_value' ) #NEWLINE# errors . append ( ( '$error.maxlength' , ( message % { #NEWLINE# #INDENT# 'limit_value' : self . max_length , #NEWLINE# #UNINDENT# } ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return errors