Cross Reference: validations.rb
xref
: /
ontohub
/
app
/
models
/
ontology
/
validations.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
validations.rb revision 207eff2969757da35e5167c1377d39dc48ee6652
module
Ontology
::
Validations
extend
ActiveSupport
::
Concern
included
do
validates_uniqueness_of
:
iri
,
if
: :
iri_changed
?
validates_format_of
:
iri
,
with
:
URI
::
regexp
(
Settings.allowed
_iri_schemes
)
validates
:
documentation
,
allow_blank
:
true
,
format
:
{
with
:
URI
::
regexp
(
Settings.allowed
_iri_schemes
)
}
validates_presence_of
:
basepath
validates_inclusion_of
:
state
,
in
:
Ontology
::
States
::
STATES
end
end