Add validator in preference screen