app/models/phcscriptcdn/scriptcdn/scriptversion.rb in phcscriptcdn-0.9.9 vs app/models/phcscriptcdn/scriptcdn/scriptversion.rb in phcscriptcdn-0.9.10
- old
+ new
@@ -1,6 +1,15 @@
module Phcscriptcdn
class Scriptcdn::Scriptversion < ActiveRecord::Base
+
+ # Relationships
belongs_to :script
has_many :scripturls
+
+ # Validation for Form Fields
+ validates :scrptversionpakname,
+ uniqueness: true,
+ presence: true,
+ length: { minimum: 3 }
+
end
end