You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
608 B
25 lines
608 B
2 years ago
|
import {FormRequest, ValidationRules} from '../../../forms'
|
||
|
import {Is, Str} from '../../../forms/rules/rules'
|
||
|
import {Singleton} from '../../../di'
|
||
|
|
||
|
export interface BasicLoginFormData {
|
||
|
username: string,
|
||
|
password: string,
|
||
|
}
|
||
|
|
||
|
@Singleton()
|
||
|
export class BasicLoginFormRequest extends FormRequest<BasicLoginFormData> {
|
||
|
protected getRules(): ValidationRules {
|
||
|
return {
|
||
|
username: [
|
||
|
Is.required,
|
||
|
Str.lengthMin(1),
|
||
|
],
|
||
|
password: [
|
||
|
Is.required,
|
||
|
Str.lengthMin(1),
|
||
|
],
|
||
|
}
|
||
|
}
|
||
|
}
|