vine icon indicating copy to clipboard operation
vine copied to clipboard

Can vinejs support verifying bigint field types

Open h25302 opened this issue 1 year ago • 4 comments

Package version

1.7.1

Describe the bug

be similar to: vine.bigint()

Reproduction repo

No response

h25302 avatar Feb 10 '24 02:02 h25302

Need more info on this.

What will be the input value? Because you cannot transfer bigInts over HTTP.

Do remember, VineJS is not a generic validator that validates any JavaScript property.

thetutlage avatar Mar 28 '24 10:03 thetutlage

Probably the same type of validation that the one we had in AdonisJS 5.

This means parsing a huge number sent as a string to be cast in bigint by the validator.

RomainLanz avatar Mar 28 '24 10:03 RomainLanz

Okay, so basically attempting to cast any string and number values to BigInt and report error if unable to do so

thetutlage avatar Mar 28 '24 11:03 thetutlage

I will let this issue be on hold for a while and see if others wants to share what sort of validation rules they need related to a BigInt value.

For example, with numbers we have min, max, range and so on. So I want to collect the initial set of rules to implement for the BigInt as well.

thetutlage avatar Mar 28 '24 11:03 thetutlage

Closing issue, since it hasn't received any more requests.

thetutlage avatar Nov 29 '24 02:11 thetutlage