mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:49:14 +08:00
23 lines
600 B
Ruby
23 lines
600 B
Ruby
# frozen_string_literal: true
|
|
|
|
class FormTemplate < ActiveRecord::Base
|
|
validates :name, presence: true, uniqueness: true, length: { maximum: 100 }
|
|
validates :template, presence: true, length: { maximum: 2000 }
|
|
validates_with FormTemplateYamlValidator
|
|
end
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: form_templates
|
|
#
|
|
# id :bigint not null, primary key
|
|
# name :string(100) not null
|
|
# template :text not null
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_form_templates_on_name (name) UNIQUE
|
|
#
|