Search code examples
tizen

Tizen Web/native app form validation


I was searching for Tizen form validation tutorial in both web and native app. I found nothing about these in popular libraries like jQuery/Angular JS.

I found this https://developer.tizen.org/community/tip-tech/using-livevalidation-javascript-library


Solution

  • You can use any available form validation plugins uing Jquery/AngularJS which are application for hosted Web Application. For example, i am using jQuery Validation Plugin.

    Just follow 2mins tutorial from here.

    I have adjusted the form in Tizen UI.

    <div id="main" class="page">
             <div class="contents">
              <div class="container">
                 <form action="" name="registration">
                    <label for="firstname">First Name</label>
                    <input type="text" name="firstname" id="firstname" placeholder="Steave"/>
    
                    <label for="lastname">Last Name</label>
                    <input type="text" name="lastname" id="lastname" placeholder="Smith"/>
    
                    <label for="email">Email</label>
                    <input type="email" name="email" id="email" placeholder="[email protected]"/>
    
                    <label for="password">Password</label>
                    <input type="password" name="password" id="password" placeholder="&#9679;&#9679;&#9679;&#9679;&#9679;"/>
    
                    <button type="submit">Register</button>
                 </form>
              </div>
            </div>
        </div>
    

    Required libraries and js must be added.

      <script src="lib/jquery.js"></script>
      <script src="lib/jquery.validate.min.js"></script>
      <script src="js/form-validation.js"></script>
    

    enter image description here