Disclaimer: I am a new Unity user and by extension also a new NGUI user so if I say something stupid . . . oops!

Anyway, I have an Input and whenever the user changes the text string in the input, I want to be able to validate the text in the label. I tried to key this off of the OnInput message, but that message only sends the key that was pressed, not the new value of the text in the label. And if you try to get the text from the label, it still holds the text value from before the user typed the key.
I took a look at UIInput and I modified the OnInput method like so:
void OnInput (string input)
{
if (selected && enabled && gameObject.active)
{
// Mobile devices handle input in Update()
if (Application.platform == RuntimePlatform.Android) return;
if (Application.platform == RuntimePlatform.IPhonePlayer) return;
foreach (char c in input)
{
if (c == '\b')
{
// Backspace
if (mText.Length > 0) mText = mText.Substring(0, mText.Length - 1);
//NEW MESSAGE
gameObject.SendMessage("OnInputChanged", mText, SendMessageOptions.DontRequireReceiver);
}
else if (c == '\r' || c == '\n')
{
// Enter
gameObject.SendMessage("OnSubmit", SendMessageOptions.DontRequireReceiver);
selected = false;
return;
}
else
{
// All other characters get appended to the text
mText += c;
//NEW MESSAGE
gameObject.SendMessage("OnInputChanged", mText, SendMessageOptions.DontRequireReceiver);
}
}
// Ensure that we don't exceed the maximum length
UpdateLabel();
}
}
And now I can handle the OnInputChanged message to validate my inputs. Is there a better way to do this? If not, I'd suggest this code change be added to the next release of NGUI.