add valid_high and valid_low to define validator besides high and low

if valid_high and valid_low exist, it will be used to define the validator instead. and high and low still can be transferred to optimizer

if valid_high and valid_low not defined, it will assign the value of high and low and behave like before this update to keep compatible.