Giter Club home page Giter Club logo

Comments (4)

mmuhamadamirzaidi avatar mmuhamadamirzaidi commented on June 4, 2024 1

Hi @rarestoma,

Thanks for your time and respond to help me out to solve the validation search dropdown issue. And yeah, your solution works like charms!

I appreciate your kindness and support. Once again, thanks!

Sincerely,
Muhamad Amir

from ct-argon-dashboard-pro-laravel.

rarestoma avatar rarestoma commented on June 4, 2024

Hi @mmuhamadamirzaidi,

Thank you for working with our products.

Can you please give show us how did you implement the javascript of the validation so I can test it closely? It should add 'is-valid' / 'is-invalid' classes to the input so the border will turn to green(success)/red(error).

Thank you,
Rares

from ct-argon-dashboard-pro-laravel.

mmuhamadamirzaidi avatar mmuhamadamirzaidi commented on June 4, 2024

Hi @rarestoma,

Thanks for your reply.

I used the needs-validation class in the form tag, and also valid-feedback/ invalid-feedback class in the feedback. All the input type like text input, number, file, and normal dropdown are working fine, unless for search dropdown.

Sample form code I used:

form-code

Sample code for text input:

text-input

Output after validate:

text-input-output

Sample code for file input:

file-input

Output after validate:

file-input-output

Normal dropdown:

normal-dropdown-invalid

normal-dropdown-valid

Sample code for search dropdown with data-toggle="select":`

search-dropdown

Output after validate:

When select search dropdown:

search-dropdown-when-select

Valid:

search-dropdown-valid

Even after select, it takes the primary color as border color, not the green.

Invalid:

search-dropdown-invalid

For invalid, it doesn't put red color. The valid-feedback/ invalid-feedback feedback is working fine.

Please help me to solve this. Thanks in advance.

from ct-argon-dashboard-pro-laravel.

rarestoma avatar rarestoma commented on June 4, 2024

Hi @mmuhamadamirzaidi,

Thank you for providing me all the details.

Can you please add these lines on the CSS and try again?

.was-validated .form-control:valid  ~ .select2 .select2-selection{
  border: 1px solid #2dce89;
}

.was-validated .form-control:invalid  ~ .select2 .select2-selection{
  border: 1px solid #fb6340;
}

I tested it and now the border of the selects turns to green/red when is valid/invalid.

Please let me know if it works.

Thank you,
Rares

from ct-argon-dashboard-pro-laravel.

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.