GithubHelp home page GithubHelp logo

Comments (4)

sesemaya avatar sesemaya commented on May 18, 2024

hi @plrenaudin is the following code what you are looking for?

<div class="form-group form-group-label form-group-red">
    <div class="row">
        <div class="col-lg-6 col-sm-8">
            <label class="floating-label" for="input-required">Required</label>
            <input class="form-control" id="input-required" type="text">
            <span class="form-help form-help-msg text-red">Input is required<i class="form-help-icon icon icon-warning"></i></span>
        </div>
    </div>
</div>

from material.

plrenaudin avatar plrenaudin commented on May 18, 2024

Hi @sesemaya,
Thanks for replying.
The behavior of a required field is not the same on the polymer element: once you fill it in, the warning disappear.
The best way would be to handle this the same as the required attribute on a html input : display the warning on the form submit.

from material.

shib71 avatar shib71 commented on May 18, 2024

Couldn't you implement this yourself with JavaScript? Incorporating
specific behaviours is a little beyond the focus of this project, which is
design and page structure.

On Wed, Apr 22, 2015 at 5:36 PM, Pierre-Louis Renaudin <
[email protected]> wrote:

Hi @sesemaya https://github.com/sesemaya,
Thanks for replying.
The behavior of a required field is not the same on the polymer element:
once you fill it in, the warning disappear.
The best way would be to handle this the same as the required attribute on
a html input : display the warning on the form submit.


Reply to this email directly or view it on GitHub
#12 (comment).

from material.

plrenaudin avatar plrenaudin commented on May 18, 2024

Ok, I found a small workaround anyway which works for me without JS.
I added those lines at the end of base.css

.form-control:invalid, .form-control:invalid + .floating-label{
  color:red;
  border-bottom-color:red;
}

from material.

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.