-
Notifications
You must be signed in to change notification settings - Fork 28
Form
Brian Zou edited this page Mar 7, 2019
·
7 revisions
module app.form.LoginForm;
import hunt.framework;
class LoginForm : Form
{
mixin MakeForm;
@Length(6,20)
string username;
@Length(8,16)
string password;
}
@Action
string login(LoginForm loginForm)
{
auto result = loginForm.valid();
// TODO
if(!result.isValid)
{
logError("Valid error message : " ,result.messages());
}
}