>>>>> christian <[email protected]> writes:
> I've got an account, in which there is just a limited number of valid
> amounts being booked. To prevent incorrect amounts from being booked, I
> thought of a check through ledger.
> I thought of
> --- myledger.dat
> account expenses:limitedamounts
> check amount == {1|3|5|7|11|13}
> 2013/01/13 payeeA
> expenses:limitedamounts 5
> assets:checking
> 2013/01/13 payeeB
> expenses:limitedamounts 6
> assets:checking
> ---/myledger.dat
> ledger -f myledger.dat --pedantic reg
> would yield a errormessage for payeeB, because the amount isn't declared.
> Is that possible with ledger?
Yes, usually almost exactly the syntax you described. I think you just need:
check amount =~ /^(1|3|5|7|11|13)$/
John