Note: Due to my current situation, I must work with Ember 2.18 but I am curious if version ^3.4 has certain features that 2.x does not.
I am creating a Boolean based on the values of two other Booleans. Within the class, the following code snippet is present:
userEmail: '',
feedbackText: '',
emailIsValid: match('useEmail', /^.+@.+\..+$/),
feedbackTextIsValid: gte('feedbackText.length', 5),
disableSubmit: computed('emailIsValid', 'feedbackTextIsValid', function() {
return (!this.get('emailIsValid') || !this.get('feedbackTextIsValid'));
}),
In simple terms, the disableSubmit
property should be true if either userEmail
is not a valid email or if feedbackText
has less than 5 characters. This functionality works as intended.
My question is whether there exists a method similar to not
or match
that can return true
if either of two other values is not true
.