Whether value passes the optional validator.
bool get isValid => validator == null || validator!(value);