Add settng validation function