(self, data, pfx="")
return data
validates data in dict
validates data in dict
validates data in dict
def validate_dict(self, data, pfx=""):
        """validates data in dict"""
        for k, v in data.items():
            if v:
                ok, u = skytools.safe_utf8_decode(v)
                if not ok:
                    self.show_error(k, v, pfx, u)
                    data[k] = u.encode('utf8')
        return data
def validate_dict ( self , data , pfx = "" ) : for k , v in data . items ( ) : if v : ok , u = skytools . safe_utf8_decode ( v ) if not ok : self . show_error ( k , v , pfx , u ) data [ k ] = u . encode ( 'utf8' ) return data