v12.0.0
Module
- feat: NbFormModule - 提供可用的
component
- feat: NbFormTestingModule - 提供单元测试环境
Validators
- feat: NbFormValidators.arrLength - 数组长度校验器
- feat: NbFormValidators.equal - 控件值是否相等校验器
- feat: NbFormValidators.fileSize - 文件大小校验器
- feat: NbFormValidators.fileType - 文件类型校验器
- feat: NbFormValidators.required - 必填校验器
- feat: NbFormValidators.whitespace - 是否允许都为空格校验器
Services
- feat: NbFormService - 提供常用表单功能
Components
- feat:
<nb-control-err></nb-control-err>
- 显示控件错误信息 - feat:
<nb-field-item></nb-field-item>
- 提供常见的字段布局,以及控件错误信息,常用于表单中
Tokens
- feat: NB_CONTROL_COMMON_ERR_INFO_TOKEN - 通过DI设置常见的错误信息,便于在
<nb-control-err></nb-control-err>
中使用
Interfaces
- feat: NbAbstractControl - 抽象控件类型
- feat: INbFormConfigs - 表单的控件配置
- feat: INbControlConfig - 控件配置
- feat: INbControlErrInfo - 控件错误信息
Enums
- feat: NbControlErrTypeEnum - 常用表单错误枚举
Module
- feat: NbFormModule - provide some useful
component
- feat: NbFormTestingModule - provide the env to unit test;
Validators
- feat: NbFormValidators.arrLength - array length validator
- feat: NbFormValidators.equal - values are equal validator
- feat: NbFormValidators.fileSize - file size validator
- feat: NbFormValidators.fileType - file type validator
- feat: NbFormValidators.required - required validator
- feat: NbFormValidators.whitespace - can all be whitespace validator
Services
- feat: NbFormService - a
service
which provide some common function about form
Components
- feat:
<nb-control-err></nb-control-err>
- the component is used to show error info of the control - feat:
<nb-field-item></nb-field-item>
- it has common layout and can show error info
Tokens
- feat: NB_CONTROL_COMMON_ERR_INFO_TOKEN - used to set common error info via DI, and the error information will be used in
<nb-control-err></nb-control-err>
Interfaces
- feat: NbAbstractControl - abstract control type
- feat: INbFormConfigs - form control configs
- feat: INbControlConfig - control config
- feat: INbControlErrInfo - error information of the control
Enums
- feat: NbControlErrTypeEnum - common error enum