From 894011967729076f2c1f5b689d95ee300101c9af Mon Sep 17 00:00:00 2001 From: Sergey Vinogradov Date: Thu, 3 Oct 2024 13:41:04 +0400 Subject: [PATCH] fix some issues --- articles/components/date-picker/index.adoc | 4 +--- articles/components/date-time-picker/index.adoc | 5 +++-- articles/components/email-field/index.adoc | 1 + articles/components/number-field/index.adoc | 1 - articles/components/time-picker/index.adoc | 4 ++-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/articles/components/date-picker/index.adoc b/articles/components/date-picker/index.adoc index 8847b2260e..e59ab29f3d 100644 --- a/articles/components/date-picker/index.adoc +++ b/articles/components/date-picker/index.adoc @@ -68,7 +68,6 @@ The following example demonstrates how to specify these constraints and provide [.example] -- - ifdef::lit[] [source,html] ---- @@ -92,7 +91,6 @@ endif::[] -- It's important to ensure an appropriate error message is configured for each constraint violation to provide users with clear feedback. -ifdef::flow,lit[] === Custom Validation @@ -124,7 +122,7 @@ endif::[] -- Binder can also be used to organize data binding and validation for multiple fields, creating forms. You can learn more about Binder from the corresponding <<{articles}/flow/binding-data/components-binder-validation#,Flow>> and <<{articles}/hilla/lit/guides/forms/binder-validation#,Hilla>> articles. -endif::[] + == Week Numbers diff --git a/articles/components/date-time-picker/index.adoc b/articles/components/date-time-picker/index.adoc index f40963fd3f..009e520852 100644 --- a/articles/components/date-time-picker/index.adoc +++ b/articles/components/date-time-picker/index.adoc @@ -192,7 +192,8 @@ include::{root}/frontend/demo/component/datetimepicker/react/date-time-picker-va endif::[] -- -ifdef::flow,lit[] +It's important to ensure an appropriate error message is configured for each constraint violation to provide users with clear feedback. + === Custom Validation For more complex cases where constraint validation isn't enough, Flow and Hilla offer the Binder API that allows you to define custom validation rules. This is useful, for example, when you want to restrict date selection to weekdays (Monday-Friday) and time selection to opening hours. In the following example, try selecting a date that's on a weekend or a time that's outside opening hours to see a custom validation message. @@ -222,7 +223,7 @@ endif::[] -- Binder can also be used to organize data binding and validation for multiple fields, creating forms. You can learn more about Binder from the corresponding <<{articles}/flow/binding-data/components-binder-validation#,Flow>> and <<{articles}/hilla/lit/guides/forms/binder-validation#,Hilla>> articles. -endif::[] + == Week Numbers diff --git a/articles/components/email-field/index.adoc b/articles/components/email-field/index.adoc index f3d0a9a312..69cec4d9e0 100644 --- a/articles/components/email-field/index.adoc +++ b/articles/components/email-field/index.adoc @@ -123,6 +123,7 @@ It's important to ensure an appropriate error message is configured for each con include::{articles}/components/_input-field-common-features.adoc[tags=binder] + // Readonly and disabled include::{articles}/components/_input-field-common-features.adoc[tag=readonly-and-disabled] diff --git a/articles/components/number-field/index.adoc b/articles/components/number-field/index.adoc index 538c0a4683..2773b45645 100644 --- a/articles/components/number-field/index.adoc +++ b/articles/components/number-field/index.adoc @@ -102,7 +102,6 @@ The following example demonstrates how to create a quantity field using a combin [.example] -- - ifdef::lit[] [source,typescript] ---- diff --git a/articles/components/time-picker/index.adoc b/articles/components/time-picker/index.adoc index a6f1f793a6..510d09ff30 100644 --- a/articles/components/time-picker/index.adoc +++ b/articles/components/time-picker/index.adoc @@ -197,7 +197,8 @@ include::{root}/frontend/demo/component/timepicker/react/time-picker-validation. endif::[] -- -ifdef::flow,lit[] +It's important to ensure an appropriate error message is configured for each constraint violation to provide users with clear feedback. + === Custom Validation For more complex cases where constraint validation isn't enough, Flow and Hilla offer the Binder API that allows you to define custom validation rules. This is useful, for example, when you want to allow time selection only within separate intervals, like morning and afternoon slots. In the following example, try selecting a time that is between opening hours to see a custom validation message. @@ -227,7 +228,6 @@ endif::[] -- Binder can also be used to organize data binding and validation for multiple fields, creating forms. You can learn more about Binder from the corresponding <<{articles}/flow/binding-data/components-binder-validation#,Flow>> and <<{articles}/hilla/lit/guides/forms/binder-validation#,Hilla>> articles. -endif::[] // Basic Features