Skip to content

Tag: validation

Regex windows path validator

I’ve tried to find a windows file path validation for Javascript, but none seemed to fulfill the requirements I wanted, so I decided to build it myself. The requirements are the following: the path should not be empty may begin with x:, x:\, , // and followed by a filename (no file extension required) f…

How to share some code among components in Vue

I have component with code like that: I would like to share myValidator and response in order to doesn’t repeat that code in many components. But, probably, because of lack of knowledge in Javascript I have not idea how to do that. So any advice will be appreicate. Answer Vue.js is incredibly flexible. …

Validating object structure in vue.js

I’m currently building a component in vue.js and I have a bit of a problem. You see, there’s a lot of parameters you can give to my component, so for the sake of clarity, I decided to go with the approach below: Basically, I define an object containing the necessary parameters and I give that to m…

Reset Password Using Html and javascript

I Have a requirement where i have 3 input fields namely 1.old password 2.new password 3.confirm password. For which i need to apply rules as follows. 1.Old and new passwords should not match. 2.No field should be empty. 3.New password and confirm password inputs should be same. If all these validations passes…