Well maybe we should just have a validation function, which checks for 0-9a-fA-F only and truncates