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.
21 lines
578 B
21 lines
578 B
import {FormRequest, ValidationRules} from '../../forms'
|
|
import {Is, Str} from '../../forms/rules/rules'
|
|
import {Singleton} from '../../di'
|
|
import {AuthenticatableCredentials} from '../types'
|
|
|
|
@Singleton()
|
|
export class BasicLoginFormRequest extends FormRequest<AuthenticatableCredentials> {
|
|
protected getRules(): ValidationRules {
|
|
return {
|
|
identifier: [
|
|
Is.required,
|
|
Str.lengthMin(1),
|
|
],
|
|
credential: [
|
|
Is.required,
|
|
Str.lengthMin(1),
|
|
],
|
|
}
|
|
}
|
|
}
|