You didn’t provide any details about the programming language and the database being used.
In general, you could perform such validation in your application, or with a database check constraint.
REGISTER or login:
Private Sub AddCheckConstraint()
"alter table YourTable add constraint YourContraintName check (([FuelAmount]=0 and [FuelLiters]=0) Or ([FuelAmount]>0 And [FuelLiters]>0))"