5
RoR 4 में मान्यताओं के साथ नियमित अभिव्यक्ति
निम्नलिखित कोड है: class Product < ActiveRecord::Base validates :title, :description, :image_url, presence: true validates :price, numericality: {greater_than_or_equal_to: 0.01} validates :title, uniqueness: true validates :image_url, allow_blank: true, format: { with: %r{\.(gif|jpg|png)$}i, message: 'URL must point to GIT/JPG/PNG pictures' } end यह काम करता है, लेकिन जब मैं इसे "रेक टेस्ट" का …