@@ -50,8 +50,10 @@ Features:
5050 - ` link.clone() ` creates shallow copy of the enclosed object.
5151- Added "Users List" application example.
5252- ` link.toggle ` is _ removed_ . Use ` link.update( x => !x ) ` instead.
53- - ` <NumberInput/> ` tag with input rejection for numbers.
5453- Validator functions for ` link.check ` may contain default ` error ` message.
54+ - tags.jsx:
55+ - ` <NumberInput/> ` tag with input rejection for numbers.
56+ - All text input tags adds ` required ` class if there's validation error and value is empty (issue #5 ).
5557
5658# Installation
5759
@@ -343,7 +345,7 @@ Also, there's [working](https://volicon.github.io/valuelink) [example](/example/
343345
344346### Text and number form fields
345347
346- ##### <Input type =" text " />, <TextArea />
348+ ##### ` <Input type="text"/> ` , ` <TextArea /> `
347349
348350` tags.jsx ` contains wrappers for standard ` <input> ` and ` <textarea> ` tags,
349351 which can be directly bound to the string state elements.
@@ -355,7 +357,7 @@ These wrappers will add `invalid` class to enclosed HTML element, if an error is
355357< TextArea valueLink= { link } / >
356358```
357359
358- ##### <NumberInput />
360+ ##### ` <NumberInput/> `
359361
360362There's also cross-browser implementation of * numeric input* tag. It has following differences compared to ` <Input> ` :
361363
@@ -373,7 +375,7 @@ There's also cross-browser implementation of *numeric input* tag. It has followi
373375
374376### Checkboxes
375377
376- ##### <Input type =" checkbox " >
378+ ##### ` <Input type="checkbox" /> `
377379
378380Wrapper for the standard ` <input> ` . Directly binds boolean value with ` checkedLink ` property.
379381
@@ -382,7 +384,7 @@ Wrapper for the standard `<input>`. Directly binds boolean value with `checkedLi
382384< Input type= " text" checkedLink= { arrayLink .contains ( ' option' ) } / >
383385```
384386
385- ##### <Checkbox >
387+ ##### ` <Checkbox/> `
386388
387389Internally, it's ` <div> ` element which toggles ` selected ` class on click.
388390Thus, it can be easily styled.
@@ -398,7 +400,7 @@ It passes through anything else, including `children`.
398400
399401### Radio Groups and Select list
400402
401- ##### <Select >
403+ ##### ` <Select/> `
402404
403405Wrapper for standard <select />. Regular <option /> tags must be used. All props are passed through.
404406
@@ -409,7 +411,7 @@ Wrapper for standard <select/>. Regular <option/> tags must be used. All props a
409411< / Select>
410412```
411413
412- ##### <Input type =" radio " >
414+ ##### ` <Input type="radio"/> `
413415
414416Wrapper for the standard ` <input> ` . Directly binds boolean value with ` checkedLink ` property.
415417
@@ -426,7 +428,7 @@ Can be directly bound to the state member using `valueLink` property.
426428< / label>
427429```
428430
429- ##### <Radio >
431+ ##### ` <Radio/> `
430432
431433Internally, it's ` <div> ` element which always sets ` selected ` class on click. Thus,
432434it can be easily styled.
0 commit comments