Clarification on how RangeAttribute works

I’m adding regenerating health/mana/etc to my game now, and I’m a bit confused about how to keep each attribute from rising above a maximum value. Let’s say I want HP to max out at some float maxHP, can I simply go:

float maxHP = 100;
[Range(0f, maxHP)]
public float myHP;

and rest assured that myHP = 100+25 will always return 100, and myHP = 0 - 100 will always return 0? Or is range not intended for this?

if(myHP > maxHP)
{
myHP = maxHP;
}

http://unity3d.com/learn/tutorials/modules/intermediate/scripting/attributes
for the range thing