tools/smaz: use the new validation function instead of ad-hoc code