Hello,

I started playing with D and the hunt-framework. But I bumped into an error using Validation.

```d
module app.forms.LoginForm;
import hunt.validation;
import hunt.framework.http.Form;

class LoginForm : Form {
    mixin MakeForm;
    @Email
    string name;
    @Length(3,8)
    string password;
}

```
The error looks like that:

`../hunt/validation/DeclDef.d-mixin-41(54,108): Error: undefined identifier arg`

When I remove the parameters from `@Length`, it compiles.

I tried the `dicoth` example application, but I get the same error for the validation used there.

I use this compiler: DMD64 D Compiler v2.100.2
under Linux.

My current D knowledge is not sufficient to fix the bug. No idea how the annotation and mixin templates work together here. I didn't find any documentation, how to write custom annotations.

Can somebody give me a hint?

BR Roman
  • Compiler Error while using Va... Roman Funk via Digitalmars-d-learn

Reply via email to