diff --git a/.release b/.release
index 03a6c1a..648aa35 160000
--- a/.release
+++ b/.release
@@ -1 +1 @@
-Subproject commit 03a6c1ae3688bb05c658a775ec5d66086aa18bba
+Subproject commit 648aa356cba200c1a46f4bda9e29871d1e9ba557
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 25e626e..5a9338b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
### Unreleased
+### [0.8.5] - 2026-03-15
+
+- zone.GET_req: add search params
+- zone_rec.owner: disable domain/hostname validation
+- zone_rec: add algorithm
+- zone_rec: change gateway type to a number
+- zone_rec: add timestamp
+
### [0.8.4] - 2026-03-14
- disable domain validation, until joi.string.domain supports /
@@ -95,7 +103,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
[0.6.3]: https://github.com/NicTool/validate/releases/tag/v0.6.3
[0.7.0]: https://github.com/NicTool/validate/releases/tag/0.7.0
[0.7.1]: https://github.com/NicTool/validate/releases/tag/v0.7.1
-[0.7.2]: https://github.com/NicTool/validate/releases/tag/0.7.2
+[0.7.2]: https://github.com/NicTool/validate/releases/tag/v0.7.2
[0.7.3]: https://github.com/NicTool/validate/releases/tag/0.7.3
[0.7.4]: https://github.com/NicTool/validate/releases/tag/v0.7.4
[0.8.0]: https://github.com/NicTool/validate/releases/tag/v0.8.0
@@ -103,3 +111,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
[0.8.2]: https://github.com/NicTool/validate/releases/tag/v0.8.2
[0.8.3]: https://github.com/NicTool/validate/releases/tag/v0.8.3
[0.8.4]: https://github.com/NicTool/validate/releases/tag/v0.8.4
+[0.8.5]: https://github.com/NicTool/validate/releases/tag/v0.8.5
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index c2e6fcf..e1fe672 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -2,7 +2,7 @@
This handcrafted artisanal software is brought to you by:
-| 
msimerson (23) |
+| 
msimerson (24) |
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
this file is generated by [.release](https://github.com/msimerson/.release).
diff --git a/lib/zone.js b/lib/zone.js
index 84d63a5..6456c8c 100644
--- a/lib/zone.js
+++ b/lib/zone.js
@@ -42,6 +42,13 @@ exports.v3 = Joi.object({
exports.GET_req = Joi.object({
id: exports.id,
zone: exports.zone,
+ search: Joi.string().max(255).allow(''),
+ zone_like: Joi.string().max(255).allow(''),
+ description_like: Joi.string().max(255).allow(''),
+ limit: shared.uint32,
+ offset: shared.uint32,
+ sort_by: Joi.string().valid('id', 'zone', 'description', 'last_modified'),
+ sort_dir: Joi.string().lowercase().valid('asc', 'desc'),
deleted: Joi.boolean(),
})
diff --git a/lib/zone_record.js b/lib/zone_record.js
index 905d1d6..44049e7 100644
--- a/lib/zone_record.js
+++ b/lib/zone_record.js
@@ -7,7 +7,12 @@ exports.id = shared.uint32.min(1).required()
exports.owner = Joi.string()
.min(1)
.max(255)
- .domain({ minDomainSegments: 1, allowFullyQualified: false, tlds: false })
+ // .hostname({
+ // minDomainSegments: 1,
+ // allowFullyQualified: false,
+ // allowUnderscore: true,
+ // tlds: false,
+ // })
.required()
exports.v3 = Joi.object({
@@ -61,6 +66,8 @@ exports.v3 = Joi.object({
address: Joi.string().min(2).max(39),
+ algorithm: Joi.number().integer().min(0).max(255),
+
cname: Joi.string(),
data: Joi.string(),
@@ -77,7 +84,7 @@ exports.v3 = Joi.object({
gateway: Joi.string().empty(''),
- 'gateway type': Joi.string().empty(''),
+ 'gateway type': Joi.number().empty(''),
location: Joi.string().empty(''),
@@ -105,6 +112,8 @@ exports.v3 = Joi.object({
target: Joi.string(),
+ timestamp: Joi.date(),
+
weight: shared.uint16,
value: Joi.string(),
diff --git a/lib/zone_record.test.js b/lib/zone_record.test.js
index 8b2081e..eb81b9b 100644
--- a/lib/zone_record.test.js
+++ b/lib/zone_record.test.js
@@ -68,8 +68,16 @@ describe('zone_record', function () {
assert.strictEqual(error.message, '"owner" is not allowed to be empty')
})
+ it('accepts underscores in labels', () => {
+ const testCase = JSON.parse(JSON.stringify(testZR))
+ testCase.owner = '_acme-challenge.example'
+ const { error, value } = schema.validate(testCase)
+ assert.ifError(error)
+ assert.deepEqual(value, testCase)
+ })
+
for (const owner of ['a.m.', 'something.test.']) {
- it(`rejects invalid: ${owner}`, () => {
+ it.skip(`rejects invalid: ${owner}`, () => {
const testCase = JSON.parse(JSON.stringify(testZR))
testCase.owner = owner
const { error } = schema.validate(testCase)
diff --git a/package.json b/package.json
index 5adeada..2383930 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@nictool/validate",
- "version": "0.8.4",
+ "version": "0.8.5",
"description": "NicTool Object Validation",
"files": [
"lib",