added validate_float and improved validat_int