Why is the getConfigValue()
function not retrieving validation values from custom Strategies?
For example:
@Injectable()
export class CustomStrategy extends NbPasswordAuthStrategy {
protected defaultOptions: CustomStrategyOptions = CustomStrategyOptions;
static setup(options: CustomStrategyOptions): [NbAuthStrategyClass, CustomStrategyOptions] {
return [CustomStrategy, options];
}
}
export class CustomStrategyOptions extends NbPasswordAuthStrategyOptions {
validation?: CustomValidation;
}
export const customStrategyOptions: CustomStrategyOptions = new CustomStrategyOptions();
The CustomValidation
class contains different fields than fullName
, password
, and email
, such as name
, lastName
, date birth
, and gender
.
In a custom RegisterComponent
, if you try the following in form inputs:
export class RegisterComponent extends NbRegisterComponent implements OnInit {
ngOnInit() {
console.log('validations', this.getConfigValue('forms.validation'));
}
}
The output only shows fullName
, password
, and email
. How can I include custom strategy validations in the getConfigValue()
method in Nebular?