stubLoginForm function
Implementation
String stubLoginForm() => '''
import 'package:nylo_framework/nylo_framework.dart';
/* Login Form
|--------------------------------------------------------------------------
| Usage: https://nylo.dev/docs/6.x/forms#how-it-works
| Casts: https://nylo.dev/docs/6.x/forms#form-casts
| Validation Rules: https://nylo.dev/docs/6.x/validation#validation-rules
|-------------------------------------------------------------------------- */
class LoginForm extends NyFormData {
LoginForm({String? name}) : super(name ?? "login");
@override
fields() => [
Field.email("Email",
autofocus: true,
validate: FormValidator.email(),
style: "compact"
),
Field.password("Password",
validate: FormValidator.password(strength: 1),
style: "compact"
),
];
}
''';