mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Support for XEP-0122: Data Forms Validation.
Data Forms Validation are a part of Data Fields and implemented as extensions, added to a Datafield. Data validation extensions are validated before adding to the message, using the consistency rules as described in the XEP. Fixes SMACK-621. Minor modifications done by Florian Schmaus <flo@geekplace.eu>
This commit is contained in:
parent
019b9dc5d4
commit
b08dbc1dbc
13 changed files with 943 additions and 66 deletions
|
@ -206,14 +206,14 @@ public class XmlStringBuilder implements Appendable, CharSequence {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add the given attribute if value => 0
|
||||
* Add the given attribute if value not null and value => 0.
|
||||
*
|
||||
* @param name
|
||||
* @param value
|
||||
* @return a reference to this object
|
||||
*/
|
||||
public XmlStringBuilder optLongAttribute(String name, Long value) {
|
||||
if (value >= 0) {
|
||||
if (value != null && value >= 0) {
|
||||
attribute(name, Long.toString(value));
|
||||
}
|
||||
return this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue