-Refactored
- isPlainObject
- minItemsYobta
- patterns
Renamed:
- yobta => createValidator
- asyncYobta => createAsyncValidator
- arrayYobta => array
- itemsYobta => items
- awaitShapeYobta => asyncShape
- awaitSunbmitYobta => asyncSubmit
- booleanYobta => boolean
- constYobta => constant
- dateYobta => date
- defaultYobta => fallback
- effectYobta => effect
- emailYobta => email
- enumYobta => oneOf
- errorsYobta => errors
- integerYobta => integer
- numberYobta => number
- maxDateYobta => maxDate
- maximumYobta => maxNumber
- maxItemsYobta => maxItems
- maxCharactersYobta => maxCharacters
- minCharactersYobta => minCharacters
- minDateYobta => minDate
- minItemsYobta => minItems
- minimumYobta => minNumber
- formYobta => form
- identicalYobta => identical
- requiredYobta => required
- ruleYobta => rule
- shapeYobta => shape
- differentYobta => different
- stringYobta => string
- successYobta => success
- testYobta => test
- uniqueYobta => unique
- validityYobta => validity
Added:
- asyncPipe
- pipe
Removed:
- catchYobta
- urlSearchParamsYobta
Todo:
form
- move form-related logic to form createContext
- add support for accepting FormData as input
- Slightly refactiored typings
- Added utility type PrettyTypeYobta
- No validity reporting on hidden inputs
- Readonly inputs not using reportValidity and sending errors to error handler.
- Fixed validity messages order to show message near the first failed form element
- changed validity props, added required unhandled error callback
- removed mode option
- added new option validateAllFieldsOnChange
- attempt to improve async rules typings
- failed npm publish
- updated dev deps, changed let to const
- const vlidator
- minimum and maximum to accept undefined
- fix optional number validation
- change validity reporting to always remove errors and set with respect to options
- fixed validity event type issue
- add mode option to validity rule
- set default mode to submit
- expect validity to fire only for submit when mode is not set
- add catch to awaitSubmitYobta
- fix boolean rule typings
- rename package to @yobta/validator
- Add file extensions to ESM imports
- Unwrap async chain
- Improve validity reporting
- Fix racing condition issue in async shape validator
- Improve error constructor
- Consistent array rule
- Number rule to strip white space
- Number rule to return NaN only for undefined
- Add non-throwing sync validator
- Fix SSR context issue
- Export Yobta error class
- Slug regular expression should allow slugs starting with a digit
- RegExp test rule should accept empty strings
- Export error reporter type
- Replace generic return type of the test rule with string
- String and number rule consistent return types
- Fix related dependencies
- Fix slug length issue
- Add regression tests
- Add regular expression for testing slugs
- Keep all expressions in src/regularExpressions
- Initial release.