ValidatedEntry is a Gtk.Entry subclass that is meant to be used in forms where input must be validated before
the form can be submitted. It provides feedback to users about the state of input validation and keeps track of its own validation state.
By default, input is considered invalid.
Example
var validated_entry = new Granite.ValidatedEntry (); username_entry.changed.connect (() => { username_entry.is_valid = username_entry.text == "valid input"; });
If the ValidatedEntry.from_regex () constructor is used then the entry automatically sets its validity status. A valid regex must be
passed to this constructor.
Example
Regex? regex = null; ValidatedEntry only_lower_case_letters_entry; try { regex = new Regex ("^[a-z]*$"); only_lower_case_letters_entry = new ValidatedEntry.from_regex (regex); } catch (Error e) { critical (e.message); // Provide a fallback entry }