Splitting Validation function into setResult box value function , modifying the validate function