@vinejs/vine
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -0,1 +1,2 @@ | ||
import Macroable from '@poppinss/macroable'; | ||
import type { LiteralNode, RefsStore } from '@vinejs/compiler/types'; | ||
@@ -7,3 +8,3 @@ import { OTYPE, COTYPE, PARSE } from '../../symbols.js'; | ||
*/ | ||
declare abstract class BaseModifiersType<Output, CamelCaseOutput> implements ConstructableSchema<Output, CamelCaseOutput> { | ||
declare abstract class BaseModifiersType<Output, CamelCaseOutput> extends Macroable implements ConstructableSchema<Output, CamelCaseOutput> { | ||
/** | ||
@@ -10,0 +11,0 @@ * Each subtype should implement the compile method that returns |
@@ -10,2 +10,3 @@ /* | ||
import camelcase from 'camelcase'; | ||
import Macroable from '@poppinss/macroable'; | ||
import { OTYPE, COTYPE, PARSE, VALIDATION } from '../../symbols.js'; | ||
@@ -15,3 +16,3 @@ /** | ||
*/ | ||
class BaseModifiersType { | ||
class BaseModifiersType extends Macroable { | ||
/** | ||
@@ -18,0 +19,0 @@ * Mark the field under validation as optional. An optional |
import type { CompilerNodes, RefsStore } from '@vinejs/compiler/types'; | ||
import { OTYPE, COTYPE, PARSE } from '../../symbols.js'; | ||
import type { Parser, Validation, RuleBuilder, FieldOptions, ParserOptions, ConstructableSchema } from '../../types.js'; | ||
import Macroable from '@poppinss/macroable'; | ||
/** | ||
* Base schema type with only modifiers applicable on all the schema types. | ||
*/ | ||
export declare abstract class BaseModifiersType<Output, CamelCaseOutput> implements ConstructableSchema<Output, CamelCaseOutput> { | ||
export declare abstract class BaseModifiersType<Output, CamelCaseOutput> extends Macroable implements ConstructableSchema<Output, CamelCaseOutput> { | ||
/** | ||
@@ -9,0 +10,0 @@ * Each subtype should implement the compile method that returns |
@@ -10,6 +10,7 @@ /* | ||
import { OTYPE, COTYPE, PARSE, VALIDATION } from '../../symbols.js'; | ||
import Macroable from '@poppinss/macroable'; | ||
/** | ||
* Base schema type with only modifiers applicable on all the schema types. | ||
*/ | ||
export class BaseModifiersType { | ||
export class BaseModifiersType extends Macroable { | ||
/** | ||
@@ -16,0 +17,0 @@ * Mark the field under validation as optional. An optional |
@@ -19,2 +19,6 @@ import { BaseLiteralType } from '../base/literal.js'; | ||
}; | ||
/** | ||
* Returns the enum choices | ||
*/ | ||
getChoices(): Values | ((field: FieldContext) => Values); | ||
constructor(values: Values | ((field: FieldContext) => Values), options?: FieldOptions, validations?: Validation<any>[]); | ||
@@ -21,0 +25,0 @@ /** |
@@ -23,2 +23,8 @@ /* | ||
#values; | ||
/** | ||
* Returns the enum choices | ||
*/ | ||
getChoices() { | ||
return this.#values; | ||
} | ||
constructor(values, options, validations) { | ||
@@ -25,0 +31,0 @@ super(options, validations || [enumRule({ choices: values })]); |
{ | ||
"name": "@vinejs/vine", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Form data validation library for Node.js", | ||
@@ -36,3 +36,3 @@ "type": "module", | ||
"sync-labels": "github-label-sync --labels .github/labels.json vinejs/vine", | ||
"quick:test": "node --loader=ts-node/esm bin/test.ts" | ||
"quick:test": "node --loader=ts-node/esm --enable-source-maps bin/test.ts" | ||
}, | ||
@@ -39,0 +39,0 @@ "publishConfig": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
203026
6246