Named routes & basic login framework

This commit is contained in:
2021-07-17 12:49:07 -05:00
parent e33d8dee8f
commit e86cf420df
26 changed files with 412 additions and 77 deletions

View File

@@ -0,0 +1,24 @@
import {FormRequest, ValidationRules} from '../../forms'
import {Is, Str} from '../../forms/rules/rules'
import {Singleton} from '../../di'
export interface BasicLoginCredentials {
username: string,
password: string,
}
@Singleton()
export class BasicLoginFormRequest extends FormRequest<BasicLoginCredentials> {
protected getRules(): ValidationRules {
return {
username: [
Is.required,
Str.lengthMin(1),
],
password: [
Is.required,
Str.lengthMin(1),
],
}
}
}