extend gpio validation function