#NEWLINE# @ classmethod #NEWLINE# def onaccept( cls , table , record , method = 'create' ) : #NEWLINE# #INDENT# '\n            Helper to run the onvalidation routine for a record\n\n            @param table: the Table\n            @param record: the FORM or the Row to validate\n            @param method: the method\n        ' #NEWLINE# if hasattr ( table , '_tablename' ) : #NEWLINE# #INDENT# tablename = table . _tablename #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tablename = table #NEWLINE# #UNINDENT# onaccept = cls . get_config ( tablename , ( '%s_onaccept' % method ) , cls . get_config ( tablename , 'onaccept' ) ) #NEWLINE# if ( 'vars' not in record ) : #NEWLINE# #INDENT# record = Storage ( vars = Storage ( record ) , errors = Storage ( ) ) #NEWLINE# #UNINDENT# if onaccept : #NEWLINE# #INDENT# callback ( onaccept , onaccept , tablename = tablename ) #NEWLINE# #UNINDENT# return