Git Product home page Git Product logo

ui5-validator's People

Contributors

azn5red avatar jpenninkhof avatar luuksen avatar noelhendrikx avatar qualiture avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ui5-validator's Issues

The state remain when we use it with worklist or master-detail pages

When I use this class with master-details applications if I set the valuestate of one element to error, and then return it back to a None.
Then visit another object and go back to the previous object, then I will see the Error state again on that object.

It seems it has a problem with bound items

Valid Aggregations

Hi Robin

I should test InputFields in sap.m.table. For that I need the Aggregation "cells".

In Line 54:
aPossibleAggregations = ["cells", "items", "content", "form", "formContainers", "formElements", "fields", "sections", "subSections", "_grid"],

Do you see any problems?

Regards Philipp

License

There was no license file in this repo. I hope it's fine to reuse in my own projects?

Cheers,
Jan

The ValueState flickers on first validation run

Preconditions:

The demo uses the newest library version and automatic validation turned on in init():
sap.ui.getCore().getMessageManager().registerObject(this.getView(), true);

  1. Type in "a" in field "Some Text:"
  2. Press "Validate form"

The ValueState border of the control flickers and disappears.
Press "Validate form" again and all is ok.

It seems the library is not compatible with automatic validation.
https://openui5.hana.ondemand.com/#/topic/a90d93df5a024e8bb18826b699c9aaa7

I tried to set target and processor property of the Message instance to these values, this worked for me:

target : oControl.getId() + "/" + propertyName,
processor : new sap.ui.core.message.ControlMessageProcessor()

http://plnkr.co/edit/EAWrSoknfPU0H3ELtq6X?p=preview

[Bug] add required to input field does not work

Hi,

if I add required="true" to my input field it does not work.

I thought the following input should be validated correct (after #11).

Unfortunately it does not work:

working:

<Label text="Old style" required="true" />
                              <Input value="{ 
                                  path : '/text', 
                                  type : 'sap.ui.model.type.String', 
                                  constraints : { 
                                      minLength : 3, 
                                      maxLength : 10 
                                  }
                              }"
                               />

not working:

<Label text="length and required" required="true" />
                              <Input value="{ 
                                  path : '/text2', 
                                  type : 'sap.ui.model.type.String', 
                                  constraints : { 
                                      minLength : 3, 
                                      maxLength : 10 
                                  }
                              }" 
                              required="true" />
<Label text="only required" required="true" />
                              <Input value="{ 
                                  path : '/text3'
                              }"
                               required="true" />

image

see http://plnkr.co/edit/nj3kFKSFjtkZElQMi69m?p=preview

Any suggestions?

Thanks

Validate required fields

Sometimes i only want to validate required fields... that maybe they don't have a Type, for example with ComboBox controls.

I make a simple change on validation to control this situation

Hope you like it,.

if (oControl.getBinding(aValidateProperties[i])) {
///original code
}else if (oControl.getRequired && oControl.getRequired()===true) {
oControlBinding = oControl.getBinding(aValidateProperties[i]);
oExternalValue = oControl.getProperty(aValidateProperties[i]);
if (!oExternalValue || oExternalValue==="") {
this._isValid = false;
sap.ui.getCore().getMessageManager().addMessages(
new Message({
message: "",
type: MessageType.Error,
target : ( oControlBinding.getContext() ? oControlBinding.getContext().getPath() + "/" : "") +
oControlBinding.getPath(),
processor: oControl.getBinding(aValidateProperties[i]).getModel()
})
);
}
}

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.