Sets value to candidate only when it passes validation.
candidate
bool trySetValue(T candidate) { if (validationErrorFor(candidate) != null) return false; value = candidate; return true; }