The 28-year-old left-arm paceman, who got married on Saturday, was accused after Lahore district magistrate officials raided his house on Thursday.
The Punjab authorities passed a rule late last month banning marriage ceremonies beyond 10:00 pm in the night and barring more than one dish in meals.
The law is widely condemned in Lahore, a vibrant city where marriage ceremonies are the most lavish in the country and renowned for running late into the night.
Riaz's father Sikander said his son was granted bail from the additional session judge until December 9.
"It's a baseless case against us and Riaz has been granted bail until December 9 and after that we will file a defamation case against those who raided our house," Sikander told reporters.
Mohammad Amir, inspector in the city government, said Riaz's house was raided on reports of violation.
"We raided his house at around 11pm and found that five dishes were served in meals which was a violation and an FIR (first information report) was lodged against Riaz," Amir told AFP.
If proven guilty Riaz will be fined in the range of 100,000 to 150,000 Pakistani rupees (USD 1,000 to USD 1,500).
Riaz has played seven Tests, 39 one-dayers and six Twenty20s for Pakistan. He was dropped from the team for this month's short tour of South Africa and has not been selected since.
Photos: Kareena Kapoor Khan and Aamir Khan at Mumbai airport
Photos: SRK, wife Gauri, Aishwarya Rai, Shweta Bachchan at Vogue Awards
Photos: Harbhajan Singh-Geeta Basra's TV outing with daughter Hinaya
Photos: Malaika Arora flaunts ripped jeans like a boss!
Photos: Vaani Kapoor, Kriti Sanon, Dia Mirza sizzle on the ramp