Ali bin Abu Talib reported,

It was said to him that Ibn Abbas saw no harm in temporary marriage with women.He replied, "The Messenger of Allah ﷺ forbade it on the day of Khaybar, along with the meat of domesticated donkeys."Some people have said that if a man uses a ruse to enter into a temporary marriage, the marriage itself is invalid. Others have said that the marriage is valid but the condition attached to it is void.

Bukhari 6961

Sahih

حدثنا مسدد حدثنا يحيى عن عبيد الله بن عمر حدثنا الزهري عن الحسن وعبد الله ابني محمد بن علي عن أبيهما أن

عليا رضي الله عنه

قيل له إن ابن عباس لا يرى بمتعة النساء بأسا فقال إن رسول الله ﷺ نهى عنها يوم خيبر وعن لحوم الحمر الإنسية وقال بعض الناس إن احتال حتى تمتع فالنكاح فاسد وقال بعضهم النكاح جائز والشرط باطل

البخاري 6961صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Trickery
Chapter
Tricks in marriage
Numbering
Darussalam 6961
Bukhari 6961