notEqual static method
Validates that the value is not equal to another value
Example:
Validators.notEqual(value, 'forbidden');
Implementation
static String? notEqual(
String? value,
String? otherValue, {
String? message,
}) {
if (value == null || value.isEmpty) return null;
if (value == otherValue) {
return message ?? 'Value must be different';
}
return null;
}