Giter Club home page Giter Club logo

Comments (6)

loomchild avatar loomchild commented on July 18, 2024 23

You can prevent '-' key from propagating by adding an event handler to your input element, for example like this:

@keydown="$event.key === '-' ? $event.preventDefault() : null"

from v-money.

ortonomy avatar ortonomy commented on July 18, 2024 3

still relevant in 2021

from v-money.

rockylhc avatar rockylhc commented on July 18, 2024

Seems like downgrade to 0.7 is the only way to now

from v-money.

jonathanpmartins avatar jonathanpmartins commented on July 18, 2024

hey @ortonomy,
Unfortunately I don't think support will come soon. This repo seems to be abandoned! I decided to upgrade this package to be used with Vue3.

Welcome v-money3!

I'm interested to maintain v-money3 for vue 3 and beyond.

Negatives numbers can be blocked using the disable-negative property on the component. Feel free try it out!
Open a issue there if requirements don't meet your expectations.

from v-money.

brunofunnie avatar brunofunnie commented on July 18, 2024

You can prevent '-' key from propagating by adding an event handler to your input element, for example like this:

@keydown="$event.key === '-' ? $event.preventDefault() : null"

This can lead to false validation cause you can copy/paste a negative value

from v-money.

Emmathem avatar Emmathem commented on July 18, 2024

You can prevent '-' key from propagating by adding an event handler to your input element, for example like this:

@keydown="$event.key === '-' ? $event.preventDefault() : null"

This can lead to false validation cause you can copy/paste a negative value

I used this and it disallows copy and pasting

@copy.prevent
@paste.prevent

from v-money.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.