Skip to content

Commit

Permalink
FEAT: Date time not null validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Zdeněk Balák committed May 3, 2019
1 parent bc6de9b commit 024b259
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package cz.qase.android.formbuilderlibrary.validator

import cz.qase.android.formbuilderlibrary.ValidationException
import org.joda.time.DateTime

class DateTimeNotNullValidator(private val errorMsg: String) : FormValidator<DateTime> {
override fun validate(value: DateTime?) {
if (value == null) {
throw ValidationException(errorMsg)
}
}
}

0 comments on commit 024b259

Please sign in to comment.