Added an if to test if the live validation is optional