File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/gui/src/components/simulator Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ type RegDataRow = typeof sim.value.regs[number];
88
88
type MemDataRow = typeof memView .value .data [number ];
89
89
90
90
const rules: Record <string , ValidationRule > = {
91
+ required(value : string ) {
92
+ return !! value || " Input cannot be empty" ;
93
+ },
91
94
hex(value : string ) {
92
95
return / ^ 0? [xX][0-9A-Fa-f ] + $ / .test (value ) || " Invalid hex number" ;
93
96
},
@@ -1143,7 +1146,7 @@ function toInt16(value: number) {
1143
1146
</label >
1144
1147
<Form
1145
1148
v-slot =" $form"
1146
- :resolver =" e => validateEditInput(e, rules.size16bit)"
1149
+ :resolver =" e => validateEditInput(e, rules.required, rules. size16bit)"
1147
1150
:validate-on-value-update =" false"
1148
1151
@submit =" (e) => {
1149
1152
if (e.valid) {
You can’t perform that action at this time.
0 commit comments