We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider a odm like this:
@firestoreSerializable class TimeFrame { final Timestamp start; final Timestamp end; TimeFrame(this.lowerLimit, this.upperLimit) { _$assertTimeFrame(this); } }
I would like to validate that start is before end.
start
end
abstract class ValidatorWithOther<T> { const ValidatorWithOther(this.otherPropertyName); final String otherPropertyName; void validate(Object? value, T other, String propertyName); }
that could be extended
class IsAfterValidator extends ValidatorWithOther<Timestamp> { const IsAfterValidator(super.otherPropertyName); @override void validate(Object? value, Timestamp other, String propertyName) { // TODO: implement validate } }
And then applied to a property
@firestoreSerializable class TimeFrame { final Timestamp start; @IsAfterValidator('start') final Timestamp end; TimeFrame(this.lowerLimit, this.upperLimit) { _$assertTimeFrame(this); } }
code generation should throw an exception if the other parameter with the correct Type does not exist. (maybe even a custom_lint)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Feature Request
Consider a odm like this:
I would like to validate that
start
is beforeend
.Idea
that could be extended
And then applied to a property
code generation should throw an exception if the other parameter with the correct Type does not exist.
(maybe even a custom_lint)
The text was updated successfully, but these errors were encountered: