Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 - InputDateTime validation #9839

Closed
ssimnv opened this issue Nov 25, 2024 · 1 comment · Fixed by #9838
Closed

🐞 - InputDateTime validation #9839

ssimnv opened this issue Nov 25, 2024 · 1 comment · Fixed by #9838
Assignees

Comments

@ssimnv
Copy link

ssimnv commented Nov 25, 2024

Reproduction url

https://stackblitz.com/edit/angular-ncy3dq

Description

Validators on tui-input-date-time only calls when entered date is valid.
In this case there is no opportunity to show validation message on invalid input.
For example, when default values of control is [null, null], user inputs 11 we should show validation message, but can't, because custom validator doesn't called.

Taiga UI version

4.16.0

Browser Used

Chrome

OS Used

macOS

@nsbarsukov
Copy link
Member

nsbarsukov commented Nov 25, 2024

TODO:

  • Add updateValueAndValidity inside InputDateTime
  • Add documentation example with the following custom validator
    const completeDateTimeValidator: ValidatorFn = (
        control: AbstractControl,
    ): ValidationErrors | null =>
        control.value.every(Boolean) ? null : {incompleteDateTime: true};
  • Add playwright tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants