Validation input alert controller

It’s possible validate input’s on alert controller (alert prompt) ?

3 Likes

Hi,

I’m searching for the same feature.
Such as require that the inputs are not empty at least.

1 Like

You can put a Button with an handler that return New alert with notification “Field required” on the prompt alert and return false if Field is empty :slight_smile:

But i need true validation, like angular 2 forms :frowning:

1 Like

I really need this as well. Using alerts to accept input from the user is useful, but this is a huge sticking point for accepting sensitive data.

Same boat… Just need to stop that “blank” space input. Any help is greatly appreciated.

1 Like

me too, this is very bad "/

did you find any solution to this?

Yes, you can validation input inside alert.

I don’t know a way to use validation within an alert. But you can validate after the alert was submitted. I would use modals for that use case. If you want it to not fill the full view, use popovers instead. Both use components that are displayed. So you can fill your components with validation, forms and all the other stuff you need.

You can do Javascript validation targeting data. “name of your input”, I. E name:“amount”, type:“number”.
If(data . amount ! == null) {
//do this.
}