Add validateSlot function and make sure APIs call this before create a slot
updated operator to compare array