Required option for query params
Author: nimrossumCreated May 16, 2026Updated May 16, 2026
Similar to strict, it would be handy with a required option that throws if the parameter is missing
const searchParamsConfig = {
count: parseAsInteger.withOptions({ required: true }),
}
const loadSearchParams = createLoader(searchParamsConfig )
// Expected:
const { count, contributors } = loadSearchParams(request, { strict: true })
// count: numberSource: 47ng/nuqs