[ 
https://issues.apache.org/jira/browse/WW-5811?focusedWorklogId=1050043&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1050043
 ]

ASF GitHub Bot logged work on WW-5811:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Oct/26 15:14
            Start Date: 25/Oct/26 15:14
    Worklog Time Spent: 10m 
      Work Description: sonarqubecloud[bot] commented on PR #2061:
URL: https://github.com/apache/struts/pull/2061#issuecomment-6399369546

   ## [![Quality Gate 
Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png
 'Quality Gate 
Passed')](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=2061) 
**Quality Gate passed**  
   Issues  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [3 New 
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=2061&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png
 '') [0 Accepted 
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=2061&issueStatuses=ACCEPTED)
   
   Measures  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=2061&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [91.7% Coverage on New 
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=2061&metric=new_coverage&view=list)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0.0% Duplication on New 
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=2061&metric=new_duplicated_lines_density&view=list)
  
     
   <!

Issue Time Tracking
-------------------

    Worklog Id:     (was: 1050043)
    Time Spent: 40m  (was: 0.5h)

> Derive HTML5 min/max and required constraints for temporal controls
> -------------------------------------------------------------------
>
>                 Key: WW-5811
>                 URL: https://issues.apache.org/jira/browse/WW-5811
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Tags
>            Reporter: Lukasz Lenart
>            Assignee: Lukasz Lenart
>            Priority: Major
>             Fix For: 7.5.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> h2. Problem
> HTML5 constraint derivation ({{struts.ui.html5.constraints}}) maps range 
> validators to {{min}}/{{max}} only for {{number}} and {{range}} controls. 
> {{StrutsHtmlConstraintProvider}} deliberately skips the temporal controls, so 
> {{DateRangeFieldValidator}} (and the new {{localdate}} validator, WW-5816) 
> emit nothing.
> The {{required}} validator has a related gap. {{addRequiredField}} emits 
> {{required}} only for {{radio}} and {{file}}, because other controls submit 
> an empty string, which the {{required}} validator accepts. A temporal control 
> bound to a {{java.util.Date}} (or {{java.time}}) property is different: 
> {{DateConverter}} turns {{""}} into null, so the server rejects the empty 
> value just as the browser would. These controls currently get only 
> {{data-msg-required}}.
> h2. Scope
> * {{min}}/{{max}} on *{{date}} controls only*, from {{LocalDate}} bounds 
> ({{localdate}}) and {{java.util.Date}} bounds ({{date}}), written as 
> {{yyyy-MM-dd}}. A {{java.util.Date}} bound becomes its calendar date in the 
> server default time zone (the zone the submitted value is parsed in); 
> dropping the time never makes the browser stricter than the server. Years 
> outside 0001-9999 are skipped.
> * {{required}} on *all temporal controls* ({{date}}, {{month}}, {{week}}, 
> {{time}}, {{datetime-local}}) from a {{required}} validator, when the bound 
> property's declared type converts {{""}} to null: {{java.util.Date}} and 
> subclasses, {{Calendar}}, {{LocalDate}}, {{LocalDateTime}}, {{LocalTime}}, 
> {{OffsetDateTime}}. A {{String}} property gets no {{required}}.
> * The provider needs the property type, so {{HtmlConstraintProvider}} gains a 
> {{default}} {{constraintsFor}} overload carrying it, which delegates to the 
> 7.4.0 method.
> h2. Out of scope
> {{min}}/{{max}} on {{month}}, {{week}}, {{time}} and {{datetime-local}}: no 
> built-in converter and range validator pair reads their submitted values 
> ({{datetime-local}} submits without seconds, there is no 
> {{LocalTime}}/{{LocalDateTime}} range validator, and {{month}}/{{week}} have 
> no converter). A separate ticket if needed.
> Related: WW-5778 (datetextfield in the html5 theme), WW-5810 (java.time 
> support in datetextfield), WW-5816 ({{localdate}} validator)
> PR: [apache/struts#2061|https://github.com/apache/struts/pull/2061], docs: 
> [apache/struts-site#367|https://github.com/apache/struts-site/pull/367]



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to