Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions code/internal/property_validation/mustBeMaxLength.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function mustBeMaxLength(value, maxLength)

if isempty(value); return; end

if length(value) > maxLength
error(...
'OPENMINDS_MATLAB:PropertyValidators:ListIsTooLong', ...
'Must be an array of maximum %d items', maxLength)
end
end
10 changes: 10 additions & 0 deletions code/internal/property_validation/mustBeMinLength.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function mustBeMinLength(value, minLength)

if isempty(value); return; end

if length(value) < minLength
error(...
'OPENMINDS_MATLAB:PropertyValidators:ListIsTooShort', ...
'Must be an array of minimum %d items', minLength)
end
end
16 changes: 0 additions & 16 deletions code/internal/property_validation/mustBeSpecifiedLength.m

This file was deleted.

Loading