Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Angelo 111 posts 260 karma points
    Aug 21, 2018 @ 20:46
    Angelo
    0

    Translate Validators ?

    anyone knows how can be done ?

    thank you

    and if i want to use ohter libray for validation is it possible ?

    thank you

    AS

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Aug 24, 2018 @ 15:51
    Nicholas Westby
    0

    You can do something custom here and here. For example, you could have a function that looks for square brackets and, if present, looks up a dictionary translation.

    I'm not sure what you mean by using another library for validation. Which of these do you mean?

    • Replacing the existing validation functionality.
    • Adding additional validations.

    Formulate allows you to add additional types of validations (i.e., the validation system is extensible).

    You could also perhaps replace the existing validations, but that might be a more extensive change. If you give me some insight into your end goal, I can offer some ideas.

  • Angelo 111 posts 260 karma points
    Aug 24, 2018 @ 16:45
    Angelo
    0

    question 1: well its obvious ... :) ...that solves my probem on question 1 !!

    question 2 its something like "Replacing the existing validation functionality" Lets suppose that i want to shake the component (ios style) when the input its not ok ?

    is it possible to change that ? in some js file ?

    thank you

    Angelo

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Aug 24, 2018 @ 20:21
    Nicholas Westby
    0

    suppose that i want to shake the component (ios style) when the input its not ok

    I imagine you can do that already. I think when a validation error occurs, CSS classes are attached to the element. You could probably use that to trigger an animation.

    If you do need to customize it though, the AngularJS frontend of Formulate is modular, so you can swap out bits you want with your own custom implementation. In particular, you might want to focus here and here. That code and the rest of the JavaScript is in this directory. I think that gets tossed somewhere in App_Plugins/formulate/ when you install Formulate into a website.

    That's the AngularJS frontend of Formulate. I'm also working on a plain JavaScript version of Formulate that should be released in a few weeks or months. That one is even more modular and has no dependencies, so might be easier to customize.

Please Sign in or register to post replies

Write your reply to:

Draft