#NEWLINE# def get_invalid_value_errors( self , ng_error_key ) : #NEWLINE# #INDENT# errors = [ ] #NEWLINE# errkeys = [ ] #NEWLINE# for ( key , msg ) in self . error_messages . items ( ) : #NEWLINE# #INDENT# if ( key == 'invalid' ) : #NEWLINE# #INDENT# errors . append ( ( '$error.{0}' . format ( ng_error_key ) , msg ) ) #NEWLINE# errkeys . append ( key ) #NEWLINE# #UNINDENT# #UNINDENT# for item in msg . validators : #NEWLINE# #INDENT# if ( ( getattr ( item , 'code' , None ) == 'invalid' ) and ( 'invalid' not in errkeys ) ) : #NEWLINE# #INDENT# errmsg = getattr ( item , 'message' , gettext_lazy ( 'This input self does not contain valid data.' ) ) #NEWLINE# errors . append ( ( '$error.{0}' . format ( ng_error_key ) , errmsg ) ) #NEWLINE# errkeys . append ( 'invalid' ) #NEWLINE# #UNINDENT# #UNINDENT# return errors