Skip to content

Commit

Permalink
fix some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Oct 3, 2024
1 parent 89e4045 commit 8940119
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
4 changes: 1 addition & 3 deletions articles/components/date-picker/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ The following example demonstrates how to specify these constraints and provide

[.example]
--

ifdef::lit[]
[source,html]
----
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions articles/components/date-time-picker/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions articles/components/email-field/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 0 additions & 1 deletion articles/components/number-field/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ The following example demonstrates how to create a quantity field using a combin

[.example]
--

ifdef::lit[]
[source,typescript]
----
Expand Down
4 changes: 2 additions & 2 deletions articles/components/time-picker/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8940119

Please sign in to comment.