valid require and int before save