add regex input check for led() function