angular.module("c8y.ui").directive("c8yMax",["$parse",function(a){return{restrict:"A",require:"c8yNumber",link:function(i,e,n,r){var u;n.$observe("required",function(){u=!_.isUndefined(n.required)&&"false"!==n.required}),r.validator("c8yMax",function(e){var r=a(n.c8yMax)(i),r=Number(_.isUndefined(r)?NaN:r);return _.isNaN(r)?!u:e<=r})}}}]);