You can use the min and max attributes for parameters, like so:
parameter Modelica.SIunits.Length l1(min=0.4, max=1.5)=1 "A typical length";
If you try to enter a value for l1 that's outside of the range, a warning will appear in Model Center.
l1
Thanks Sean for your reply. I am asking about the Modelica language. The code you are showing is Mathematica code, and I don't think it can be used inside SystemModeler.
I'm not sure I understand what you mean by the "minimum attribute". Can you give an example of what you mean?
I normally do this by defining a pattern to be matched in the definition of the function
f[x_/;x>0] := x+1 (*Only runs if x>0*) f[___] := Throw["Invalid input to f"] (*Otherwise throw an error*)