|
151 | 151 |
|
152 | 152 | input, |
153 | 153 | select { |
| 154 | + transition: all 0.15s ease-in; |
| 155 | + border-color: transparent; |
154 | 156 | height: 21px; |
155 | 157 | } |
156 | 158 |
|
| 159 | + input:invalid { |
| 160 | + transition: all 0.15s ease-in; |
| 161 | + box-sizing: border-box; |
| 162 | + border: 1px solid #C339; |
| 163 | + box-shadow: 0 0 4px #F339; |
| 164 | + } |
| 165 | + |
| 166 | + /* input:invalid::after { |
| 167 | + data-invalid="it must be start by A-Z, a-z, and _, with no white space between letters" |
| 168 | + content: attr(data-invalid); |
| 169 | +
|
| 170 | + position: absolute; |
| 171 | + top: 5px; |
| 172 | + z-index: 1; |
| 173 | + } */ |
| 174 | + |
157 | 175 | #root_param .param.block select.param_input_type, |
158 | 176 | #root_command .block .command_parameter_group select.param_input_type { |
159 | 177 | width: calc(100% - 4px - 4em); |
|
461 | 479 | class="origin_name">(param)</span>:</span> |
462 | 480 | <div class="param_input data_input data"> |
463 | 481 | <div class="list_cell"> |
464 | | - <input class="param_input_name" type="text" placeholder="parameter name"> |
| 482 | + <input class="param_input_name" type="text" pattern="^[A-Za-z_]+[A-Za-z0-9_]*" placeholder="parameter name"> |
465 | 483 | <button type="button" class="append_parameter" onclick="ParameterControl.onMainAddClick(0)">Add</button> |
466 | 484 | <button type="button" class="delete_parameter" onclick="ParameterControl.onMainClrClick(0)">Clr</button> |
467 | 485 | </div> |
|
558 | 576 | <span class="param_title title sub_title">選項<span class="origin_name">(option)</span>:</span> |
559 | 577 | <input class="param_input_select_name" type="text" placeholder="display name"> |
560 | 578 | <span class="param_title title sub_title">實際值<span class="origin_name">(value)</span>:</span> |
561 | | - <input class="param_input_select_value" type="text" placeholder="option value"> |
| 579 | + <input class="param_input_select_value" type="text" pattern="^[A-Za-z_]+[A-Za-z0-9_]*" |
| 580 | + placeholder="option value"> |
562 | 581 | <div> |
563 | 582 | <button type="button" onclick="ParameterControl.onSelectAddClick(0)" |
564 | 583 | style="margin: 0 -5px 0 0;">+</button> |
|
587 | 606 | class="origin_name">(command)</span>:</span> |
588 | 607 | <div class="command_input_list data_input data"> |
589 | 608 | <div class="list_cell"> |
590 | | - <input class="command_input_name" type="text" placeholder="command name"> |
| 609 | + <input class="command_input_name" type="text" pattern="^[A-Za-z_]+[A-Za-z0-9_]*" placeholder="command name"> |
591 | 610 | <button type="button" class="append_command" onclick="CommandControl.onMainAddClick(0)">Add</button> |
592 | 611 | <button type="button" class="delete_command" onclick="CommandControl.onMainClrClick(0)">Clr</button> |
593 | 612 | </div> |
|
604 | 623 | <div class="list_cell"> |
605 | 624 | <span class="param_title title sub_title" onclick="CommandControl.onParamTitleClick(0)">參數<span |
606 | 625 | class="origin_name">(arg)</span>:</span> |
607 | | - <input class="param_input_name" type="text" placeholder="code name"> |
| 626 | + <input class="param_input_name" type="text" pattern="^[A-Za-z_]+[A-Za-z0-9_]*" placeholder="code name"> |
608 | 627 | <button type="button" class="append_parameter" onclick="CommandControl.onParamAddClick(0)">Add</button> |
609 | 628 | <button type="button" class="delete_parameter" onclick="CommandControl.onParamClrClick(0)">Clr</button> |
610 | 629 | </div> |
|
702 | 721 | <span class="param_title title sub_title">選項<span class="origin_name">(option)</span>:</span> |
703 | 722 | <input class="param_input_select_name" type="text" placeholder="display name"> |
704 | 723 | <span class="param_title title sub_title">實際值<span class="origin_name">(value)</span>:</span> |
705 | | - <input class="param_input_select_value" type="text" placeholder="option value"> |
| 724 | + <input class="param_input_select_value" type="text" pattern="^[A-Za-z_]+[A-Za-z0-9_]*" |
| 725 | + placeholder="option value"> |
706 | 726 | <div> |
707 | 727 | <button type="button" onclick="CommandControl.onSelectAddClick(0)" |
708 | 728 | style="margin: 0 -5px 0 0;">+</button> |
|
0 commit comments